{"height":"190","title":"Python\u3067UFCS\u306e\u601d\u6848 ver0.001","width":"100%","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","blog_title":"\u3086\u304f\u3086\u304f\u306f\u6709\u3078\u3068","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiuk.hateblo.jp%2Fentry%2F2017%2F01%2F14%2F081719\" title=\"Python\u3067UFCS\u306e\u601d\u6848 ver0.001 - \u3086\u304f\u3086\u304f\u306f\u6709\u3078\u3068\" 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,"categories":["python"],"url":"https://iuk.hateblo.jp/entry/2017/01/14/081719","version":"1.0","author_url":"https://blog.hatena.ne.jp/waraby0ginger/","blog_url":"https://iuk.hateblo.jp/","author_name":"waraby0ginger","published":"2017-01-14 08:17:19","description":"\u8272\u3005\u3068\u554f\u984c\u70b9\u3057\u304b\u306a\u3044\u3002\u305f\u305f\u304d\u53f0\u3068\u3044\u3046\u3053\u3068\u3067 # coding=utf-8 class UFCS: def __init__(self, value): self._value = value def __getattr__(self, name): return lambda *arg, **kwds: UFCS(eval(name)(self._value, *arg, **kwds)) def __repr__(self): return self._value UFCS(111).print() UFCS([1, 2, 3]).len().print()"}