{"width":"100%","author_name":"nishiohirokazu","provider_url":"https://hatena.blog","title":"Python3.0\u3067switch\u6587\u3092\u4f5c\u308a\u307e\u3057\u305f","author_url":"https://blog.hatena.ne.jp/nishiohirokazu/","type":"rich","version":"1.0","blog_title":"\u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc","url":"https://nishiohirokazu.hatenadiary.org/entry/20090401/1238562617","height":"190","description":"\u30a8\u30a4\u30d7\u30ea\u30eb\u30d5\u30fc\u30eb\u306a\u306e\u3067\u5618\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3084\u3063\u3066\u307f\u305f\u3002 for x in range(5): print(x) MESSAGE = \"The value is\" class _(switch(x)): @case(0) def _(): print(MESSAGE, \"zero!\") @case(1) def _(): print(MESSAGE, \"one!\") @case(2) def _(): print(MESSAGE, \"twei!\") @case_else def _(): print(MESSAGE, \"something else!!\") MESSAGE\u306f\u3061\u3083\u3093\u3068\u5916\u306e\u30b9\u30b3\u30fc\u30d7\u3092\u898b\u308c\u2026","published":"2009-04-01 14:10:17","image_url":null,"provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnishiohirokazu.hatenadiary.org%2Fentry%2F20090401%2F1238562617\" title=\"Python3.0\u3067switch\u6587\u3092\u4f5c\u308a\u307e\u3057\u305f - \u897f\u5c3e\u6cf0\u548c\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":[],"blog_url":"https://nishiohirokazu.hatenadiary.org/"}