{"height":"190","categories":["python"],"author_url":"https://blog.hatena.ne.jp/podhmo/","description":"python\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001ruby\u306eopenstruct\u306e\u3088\u3046\u306a\u632f\u308b\u821e\u3044\u3092\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6b32\u3057\u304f\u306a\u308a\u307e\u3057\u305f\u3002 \u5177\u4f53\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u632f\u308b\u821e\u3063\u3066\u6b32\u3057\u3044\u306e\u3067\u3059\u3002 os = OpenStruct(x=10) os.x # => 10 os.y = 20 (os.x, os.y) # => (10, 20) collections.namedtuple\u306f\u8fd1\u3044\u306e\u3067\u3059\u304c\u5fae\u5999\u306b\u9055\u3044\u307e\u3059\u3002\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u5272\u308a\u5f53\u3066\u308b\u6bb5\u968e\u3067\u306f\u5168\u3066\u306e\u5024\u3092\u6e21\u3059\u3088\u3046\u306b\u3057\u304f\u306a\u3044\u306e\u3067\u3059\u3002collections.defaultdict\u304c\u4f7f\u3048\u308b\u304b\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u5024\u306e\u53d6\u5f97\u304c\u5931\u6557\u3057\u305f\u969b\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304c\u6c7a\u3081\u3089\u308c\u308b\u3060\u3051\u306e\u3088\u3046\u3067\u3059\u3002*1\u8abf\u3079\u3066\u898b\u305f\u3068\u2026","blog_title":"podhmo\u306e\u65e5\u8a18","published":"2010-12-08 00:09:55","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","title":"python\u3067openstruct\u3092\u4f5c\u6210\u3002","image_url":null,"version":"1.0","author_name":"podhmo","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpodhmo.hatenadiary.org%2Fentry%2F20101208%2F1291820995\" title=\"python\u3067openstruct\u3092\u4f5c\u6210\u3002 - podhmo\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>","url":"https://podhmo.hatenadiary.org/entry/20101208/1291820995","width":"100%","blog_url":"https://podhmo.hatenadiary.org/"}