bbcmicrobit / bbcmicrobit/PythonEditor
Blocks: "change <variable> by" block causes import error
Abierto
bug
- Lenguaje dominante
- JavaScript
- Estrellas
- 201
- Forks
- 126
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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:

Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.