Skip to content

Blocks: "change <variable> by" block causes import error #45

Open
@jaustin

Description

@jaustin

The 'change variable by' block causes the following import statement to be emitted:
from numbers import Number

Which in turn causes an ImportError on the device.

It also generates rather confusing code:

count = (count if isinstance(count, Number) else 0) + -1

See the following program as an example of failure:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions