{"description":"Python\u306e\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u306f\u3069\u3046\u306a\u3063\u3066\u308b\u306e\u304b\u3002 def make_counter(i=0): def succ(): tmp = i i += 1 return tmp return succ counter = make_counter() conter() \"\"\" Traceback (most recent call last): File \"<stdin>\", line 1, in <module> File \"<stdin>\", line 3, in succ UnboundLocalError: local variable 'i' referenced before a\u2026","author_name":"javascripter","provider_url":"https://hatena.blog","url":"https://javascripter.hatenablog.com/entry/20081229/1230577791","version":"1.0","type":"rich","published":"2008-12-29 04:09:51","categories":["python"],"provider_name":"Hatena Blog","image_url":null,"width":"100%","author_url":"https://blog.hatena.ne.jp/javascripter/","blog_url":"https://javascripter.hatenablog.com/","title":"\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u7b49","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjavascripter.hatenablog.com%2Fentry%2F20081229%2F1230577791\" title=\"\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u7b49 - \u7d20\u4eba\u304c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u52c9\u5f37\u3057\u3066\u3044\u305f\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","blog_title":"\u7d20\u4eba\u304c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u52c9\u5f37\u3057\u3066\u3044\u305f\u30d6\u30ed\u30b0"}