{"blog_url":"https://www.shigemk2.com/","title":"\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 throw\u3068close","type":"rich","height":"190","author_name":"shigemk2","url":"https://www.shigemk2.com/entry/20130715/1373900342","image_url":null,"blog_title":"by shigemk2","published":"2013-07-15 23:59:02","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F20130715%2F1373900342\" title=\"\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 throw\u3068close - by shigemk2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/shigemk2/","version":"1.0","width":"100%","categories":["\u8aad\u66f8\u30ce\u30fc\u30c8"],"provider_name":"Hatena Blog","description":"def my_generator(): try: yield 'something' except ValueError: yield 'dealing with the exception' finally: # close\u3068throw\u306e\u3069\u3061\u3089\u3092\u547c\u3073\u51fa\u3057\u3066\u3082\u4e00\u7b87\u6240\u3067\u4f8b\u5916\u3092\u3064\u304b\u307e\u3048\u3066\u51e6\u7406\u3059\u308b print(\"ok let's clean\") gen = my_generator() print next(gen) # something print gen.throw(ValueError('mean mean mean')) # dealing with the exception \u4f8b\u5916\u3092\u9001\u308a\u2026","provider_url":"https://hatena.blog"}