{"title":" 0\u30681\u3092\u6b21\u3005\u8fd4\u3059\u65b9\u6cd5","author_name":"a2c","blog_url":"https://a2c.hatenablog.com/","width":"100%","height":"190","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa2c.hatenablog.com%2Fentry%2F20100902%2F1283411959\" title=\" 0\u30681\u3092\u6b21\u3005\u8fd4\u3059\u65b9\u6cd5 - When it\u2019s ready.\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["python"],"version":"1.0","author_url":"https://blog.hatena.ne.jp/a2c/","description":"True\u3060\u3063\u305f\u3089False\u3067\u3001False\u3060\u3063\u305f\u3089True\u306b\u3057\u305f\u3044\u3002 \u306a\u3093\u304b\u305d\u3093\u306a\u3053\u3068\u305d\u3053\u304b\u3057\u3053\u3067\u5fc5\u8981\u3067\u3001\u305d\u306e\u70ba\u306e\u4fbf\u5229\u306a\u3082\u306e\u304c \u3042\u308b\u306e\u304b\u306a\u3041\u3068\u601d\u3063\u305f\u3093\u3060\u3051\u3069\u7121\u3044\u307d\u3044\u3002\u3042\u308c\u304b\u306a\u3001True\u3068\u304bFalse\u30921\u3068\u304b0\u3068\u304b\u3067\u8868\u73fe\u3057\u3066\u308b\u6642\u70b9\u3067\u60c5\u8179\u306a\u6c17\u3082\u3059\u308b \u521d\u3081\u306e\u3084\u3064 x = a = (a - 1) * -1 n\u6c0f\u306b\u3064\u3063\u3053\u307e\u308c\u308b x = 1 - x \uff08\u4fee\u6b63\uff09 n\u6c0f\u306e\u30af\u30e9\u30b9\u5316 class MyInt(int): def toggle(self): return MyInt(1 - self) x = MyInt(1) x >> 1 x.toggle() >> 0 m\u6c0f\u306e\u63d0\u6848 import itertools \u2026","provider_name":"Hatena Blog","published":"2010-09-02 16:19:19","type":"rich","blog_title":"When it\u2019s ready.","url":"https://a2c.hatenablog.com/entry/20100902/1283411959","provider_url":"https://hatena.blog"}