{"description":"\u3053\u306e\u8a18\u4e8b\u306f Python Tips Advent Calendar 2012 \uff12\uff10\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002 Python \u306e\u95a2\u6570\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c\u4ed8\u3051\u3089\u308c\u307e\u3059\u3002 \u3053\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u3001\u305d\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u306f\u306a\u304f\u3001\u305d\u306e\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u521d\u671f\u5316\u3055\u308c\u307e\u3059\u3002 >>> def f(): ... print 'called f' ... return [] >>> def bar(x = f()): # \u3053\u306e bar \u95a2\u6570\u306e\u5b9a\u7fa9\u3067 f() \u304c\u547c\u3070\u308c\u308b ... x.append(1) ... return x called f >>> bar() # \u3053\u306e\u547c\u3073\u51fa\u3057\u306e\u3068\u304d\u306b\u306f f() \u306f\u547c\u3070\u308c\u306a\u3044 \u2026","author_url":"https://blog.hatena.ne.jp/melpon/","width":"100%","title":"\u95a2\u6570\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306e\u521d\u671f\u5316\u30bf\u30a4\u30df\u30f3\u30b0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmelpon.hatenadiary.org%2Fentry%2F20121220%2F1356002420\" title=\"\u95a2\u6570\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306e\u521d\u671f\u5316\u30bf\u30a4\u30df\u30f3\u30b0 - melpon\u65e5\u8a18 - Haskell\u3082C++\u3082\u307e\u3068\u3082\u306b\u6271\u3048\u306a\u3044\u3078\u305f\u308c\u306e\u30da\u30fc\u30b8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","type":"rich","published":"2012-12-20 20:20:20","provider_name":"Hatena Blog","height":"190","blog_title":"melpon\u65e5\u8a18 - Haskell\u3082C++\u3082\u307e\u3068\u3082\u306b\u6271\u3048\u306a\u3044\u3078\u305f\u308c\u306e\u30da\u30fc\u30b8","blog_url":"https://melpon.hatenadiary.org/","url":"https://melpon.hatenadiary.org/entry/20121220/1356002420","author_name":"melpon","image_url":null,"version":"1.0","categories":["Python"]}