{"blog_title":"\u30e9\u30b7\u30a6\u30e9","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbellbind.hatenadiary.org%2Fentry%2F20080212%2F1202788779\" title=\"Python\u3067\u306e\u518d\u5e30\u7684yield\u306e\u66f8\u304d\u65b9 - \u30e9\u30b7\u30a6\u30e9\" 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\u3067\u306e\u518d\u5e30\u7684yield\u306e\u66f8\u304d\u65b9","author_name":"bellbind","blog_url":"https://bellbind.hatenadiary.org/","url":"https://bellbind.hatenadiary.org/entry/20080212/1202788779","published":"2008-02-12 12:59:39","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/bellbind/","image_url":null,"height":"190","description":"\u518d\u5e30\u69cb\u9020\u306e\u8d70\u67fb\u3067generator\u3092\u4f7f\u3046\u3068\u3001generator\u30e1\u30bd\u30c3\u30c9\u306e\u518d\u5e30\u547c\u3073\u51fa\u3057\u306b\u306a\u308b\u3060\u308d\u3046\u3002\u3053\u306e\u5834\u5408\u3001generator\u306f\u5b9f\u969b\u306b\u30a4\u30c6\u30ec\u30fc\u30c8\u3057\u3066\u3001\u305d\u306e\u5024\u3054\u3068\u306byield\u3057\u306a\u304a\u3059\u5fc5\u8981\u304c\u51fa\u3066\u304f\u308b\u3002 for v in self.child.iter(): yield v # yield self.child.iter() \u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u81ea\u4f53\u3092yield\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u9593\u9055\u3044 Python 2.5\u3067\u306fyield\u5f0f\u304c\u3067\u304d\u305f\u306e\u3067\u3001list comprehension\u3092\u7121\u7406\u3084\u308a\u4f7f\u3048\u3070\u5f0f\u306b\u306f\u3067\u304d\u308b [(yield v) for v in self.child.iter()] # \u5f0f\u3068\u3057\u3066\u307f\u306a\u3055\u308c\u2026","type":"rich","categories":[],"provider_url":"https://hatena.blog","version":"1.0"}