{"blog_title":"\u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc","published":"2009-05-05 14:52:04","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20090505%2F1241502724\" title=\"weakref - \u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"version":"1.0","author_url":"https://blog.hatena.ne.jp/nishiohirokazu/","author_name":"nishiohirokazu","width":"100%","title":"weakref","description":"\u77e5\u8b58\u3068\u3057\u3066\u306f\u77e5\u3063\u3066\u3044\u305f\u304c\u59cb\u3081\u3066weakref\u304c\u5fc5\u8981\u3060\u3068\u611f\u3058\u308b\u30b7\u30c1\u30e5\u30a8\u30fc\u30b7\u30e7\u30f3\u306b\u3076\u3064\u304b\u3063\u305f\u3002\u307e\u305a\u306f\u77ed\u3044\u30b3\u30fc\u30c9\u3067\u6319\u52d5\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3002 from weakref import WeakValueDictionary class Foo(list): pass def make(): x = Foo([0]) y = Foo([1, x]) z = Foo([2, y]) return WeakValueDictionary(x=x, y=y, z=z), z d, cur = make() print cur print d.items() cur = cur[1] print cur print \u2026","type":"rich","categories":["Python"],"height":"190","provider_name":"Hatena Blog","url":"https://nishiohirokazu.hatenadiary.org/entry/20090505/1241502724","blog_url":"https://nishiohirokazu.hatenadiary.org/","provider_url":"https://hatena.blog"}