{"categories":["python"],"url":"https://pod.hatenablog.com/entry/2015/03/04/161052","published":"2015-03-04 16:10:52","width":"100%","provider_url":"https://hatena.blog","description":"pythnon\u306ecollections\u306bnamedtuple\u304c\u3042\u308a\u307e\u3059\u304c\u3002\u30b3\u30ec\u306b\u3064\u3044\u3066\u898b\u904e\u3054\u3057\u3066\u304d\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u304cTrue\u3092\u8fd4\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002 from collections import namedtuple Foo = namedtuple(\"Foo\", \"name value\") Bar = namedtuple(\"Bar\", \"name value\") foo = Foo(\"spam\", 42) bar = Bar(\"spam\", 42) print(foo == bar) # => True \u3053\u308c\u306f\u7d50\u5c40\u3001namedtuple\u306f\u540d\u524d\u306e\u901a\u308atuple\u3067\u3057\u304b\u306a\u3044\u305b\u2026","height":"190","title":"python\u306enamedtuple\u306b\u3064\u3044\u3066\u898b\u904e\u3054\u3057\u3066\u304d\u305f\u3053\u3068","type":"rich","author_name":"podhmo","provider_name":"Hatena Blog","blog_url":"https://pod.hatenablog.com/","image_url":null,"version":"1.0","author_url":"https://blog.hatena.ne.jp/podhmo/","blog_title":"podhmo's diary","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2015%2F03%2F04%2F161052\" title=\"python\u306enamedtuple\u306b\u3064\u3044\u3066\u898b\u904e\u3054\u3057\u3066\u304d\u305f\u3053\u3068 - podhmo&#39;s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}