bbcmicrobit / bbcmicrobit/PythonEditor

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

オープン
#45 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
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:
![image](https://cloud.githubusercontent.com/assets/147113/24100039/2f15c360-0d6a-11e7-817b-1b5885706e2f.png)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。