{"author_name":"melpon","url":"https://melpon.hatenadiary.org/entry/20121206/1354636589","type":"rich","image_url":null,"version":"1.0","blog_url":"https://melpon.hatenadiary.org/","width":"100%","height":"190","description":"\u3053\u306e\u8a18\u4e8b\u306f Python Tips Advent Calendar 2012 \uff16\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002 Python \u3067\u306f\u3001\u30e9\u30e0\u30c0\u5f0f\u3084\u30ed\u30fc\u30ab\u30eb\u3067\u306e def \u95a2\u6570\u306f\u3001\u305d\u308c\u3089\u3092\u5b9a\u7fa9\u3057\u305f\u6642\u306b\u3001\u5916\u306b\u3042\u308b\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306e\u53c2\u7167\u3092\u3001\u30e9\u30e0\u30c0\u5f0f\u3084\u95a2\u6570\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u90e8\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002 >>> x = 10 >>> f = lambda: x # x \u3092\u30e9\u30e0\u30c0\u5f0f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u4fdd\u5b58\u3059\u308b >>> f() # f \u306f x \u3078\u306e\u53c2\u7167\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b 10 \u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306e\u30b3\u30d4\u30fc\u3067\u306f\u306a\u304f \"\u53c2\u7167\" \u3067\u3042\u308b\u3068\u3044\u3046\u70b9\u306b\u6ce8\u610f\u3067\u3059\u3002 >>> x = 10 >>> idx = id(x) # \u3053\u3053\u3067\u4f7f\u3063\u3066\u3044\u308b x \u3068 >>> f = lambd\u2026","published":"2012-12-06 00:56:29","author_url":"https://blog.hatena.ne.jp/melpon/","provider_url":"https://hatena.blog","blog_title":"melpon\u65e5\u8a18 - Haskell\u3082C++\u3082\u307e\u3068\u3082\u306b\u6271\u3048\u306a\u3044\u3078\u305f\u308c\u306e\u30da\u30fc\u30b8","title":"\u5916\u90e8\u5909\u6570\u306e\u30ad\u30e3\u30d7\u30c1\u30e3","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmelpon.hatenadiary.org%2Fentry%2F20121206%2F1354636589\" title=\"\u5916\u90e8\u5909\u6570\u306e\u30ad\u30e3\u30d7\u30c1\u30e3 - 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>","categories":["Python"]}