bbcmicrobit / bbcmicrobit/PythonEditor
Blocks: "change <variable> by" block causes import error
未关闭
bug
- 主要语言
- JavaScript
- 星标
- 201
- 派生
- 126
- PR 合并指标
- 30 天内没有已合并 PR
描述
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:

贡献指南
评估
这个 Issue 还没有评估数据。