{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkwatch.hatenadiary.org%2Fentry%2F20080322%2F1206145969\" title=\" Mark and Sweep GC \u3088\u308a Reference count GC \u306e\u307b\u3046\u304c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u7c21\u5358\u306b\u306a\u308b - k\u306a\u3093\u3068\u304b\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":" Mark and Sweep GC \u3088\u308a Reference count GC \u306e\u307b\u3046\u304c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u7c21\u5358\u306b\u306a\u308b","image_url":null,"width":"100%","url":"https://kwatch.hatenadiary.org/entry/20080322/1206145969","categories":["python","lang"],"blog_url":"https://kwatch.hatenadiary.org/","height":"190","type":"rich","provider_name":"Hatena Blog","version":"1.0","published":"2008-03-22 09:32:49","blog_title":"k\u306a\u3093\u3068\u304b\u306e\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/kwatch/","author_name":"kwatch","provider_url":"https://hatena.blog","description":"Python \u3092\u4f7f\u3063\u3066\u9a5a\u3044\u305f\u3053\u3068\u306e\u3072\u3068\u3064\u306b\u3001open \u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092 close \u3057\u306a\u304f\u3066\u3044\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u3002\u6b63\u78ba\u306b\u8a00\u3046\u3068\u3001close \u81ea\u4f53\u306f\u5fc5\u8981\u306a\u306e\u3067\u3042\u308b\u304c\u3001Python \u304c\u52dd\u624b\u306b close \u3057\u3066\u304f\u308c\u308b\u306e\u3067\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u304c\u660e\u793a\u7684\u306b close \u3057\u306a\u304f\u3066\u3082\u3088\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\u3002 1: linenum = 0 2: def cat_n(filename): 3: global linenum 4: f = open(filename) # open \u3059\u308b\u3051\u3069 close \u3057\u3066\u306a\u3044 5: for line in f: 6: linenum += 1 7: print \"%6d: %s\" % (\u2026"}