{"width":"100%","blog_url":"https://pc.atsuhiro-me.net/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpc.atsuhiro-me.net%2Fentry%2F2021%2F02%2F02%2F211100\" title=\"Python\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306e\u30e1\u30e2 - \u307f\u30fc\u306e\u307a\u30fc\u3058\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Python\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306e\u30e1\u30e2","author_name":"atsuhiro-me","provider_name":"Hatena Blog","published":"2021-02-02 21:11:00","type":"rich","description":"\u4ee5\u4e0b\u306e\u8a18\u4e8b\u304c\u3068\u3066\u3082\u6709\u7528\u3060\u3063\u305f\u306e\u3067\u30e1\u30e2\u3057\u307e\u3059\uff0e Why am I getting an UnboundLocalError when the variable has a value? - Programming FAQ - Python 3 \u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5b9f\u884c\u3055\u308c\u307e\u3059\uff0e x = 10 def bar(): print(x) bar() 10 x=1\u3092\u8ffd\u52a0\u3059\u308b\u3068\uff0cUnboundLocalError\u304c\u767a\u751f\u3057\u307e\u3059\uff0e x = 10 def bar(): print(x) x = 1 bar() Exception has occurred: UnboundLocalError local vari\u2026","url":"https://pc.atsuhiro-me.net/entry/2021/02/02/211100","provider_url":"https://hatena.blog","categories":["Python"],"image_url":null,"height":"190","author_url":"https://blog.hatena.ne.jp/atsuhiro-me/","version":"1.0","blog_title":"\u307f\u30fc\u306e\u307a\u30fc\u3058"}