Pythonのお勉強 Part34 at TECH
[2ch|▼Menu]
729:デフォルトの名無しさん
09/09/08 18:11:51
>>726
>>> def fa():
...  a=3
...  def fb():
...   fa.a+=5
...   print fa.a
...  print a
...  return fb
...
>>> b=fa()
3
>>> b()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in fb
AttributeError: 'function' object has no attribute 'a'



次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4179日前に更新/189 KB
担当:undef