bbcmicrobit / bbcmicrobit/PythonEditor
Blocks: "change <variable> by" block causes import error
Aperta
bug
- Lingua principale
- JavaScript
- Stelle
- 201
- Fork
- 126
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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:

Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.