{"version":"1.0","blog_title":"pythonco(\u3071\u3044\u305d\u3093\u3053)\u306e\u65e5\u8a18","description":"\u5b9f\u884c\u6642\u306b\u30af\u30e9\u30b9\u5b9a\u7fa9\u3092\u6c7a\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 class Foo: ans = raw_input('choose 1 or 2: ') if ans == '1': def hello(self): print 'hello, i am one.' elif ans == '2': def hello(self): print 'hello, i am two.' else: def hello(self): print 'hello, i am', Foo.ans Foo().hello() Foo().hello()\u5b9f\u884c\u4f8b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059 choose 1 or 2: 2 hello\u2026","author_url":"https://blog.hatena.ne.jp/pythonco/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpythonco.hatenadiary.org%2Fentry%2F20061001%2Fp3\" title=\" \u30af\u30e9\u30b9\u5b9a\u7fa9\u306f\u52d5\u7684 - pythonco(\u3071\u3044\u305d\u3093\u3053)\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>","published":"2006-10-01 00:00:02","provider_name":"Hatena Blog","categories":[],"url":"https://pythonco.hatenadiary.org/entry/20061001/p3","title":" \u30af\u30e9\u30b9\u5b9a\u7fa9\u306f\u52d5\u7684","author_name":"pythonco","blog_url":"https://pythonco.hatenadiary.org/","image_url":null,"provider_url":"https://hatena.blog","height":"190","type":"rich","width":"100%"}