
下記のコードで発生するエラーが解決できません。
while pile is not empty:のemptyで
Unresolved reference 'empty' less... (Ctrl+F1)
This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.
というエラーが出てしまいました。
Fileメニュー の「Invalidate Caches / Restart...」
python
1def look_for_key(main_box): 2 pile = main_box.make_a_pile_to_look_through() 3 while pile is not empty(): 4 box = pile.grab_a_box() 5 for item in box: 6 if item.is_a_box(): 7 pile.append(item) 8 elif item.is_a_key(): 9 print "found the key!" 10
- 環境
- win10
- 開発環境はpyCharm
- 使用言語はpython2.7
- やってみたこと
- PyCharmのFileメニュー の「Invalidate Caches / Restart...」を実行

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/07/19 02:55