Eryk Sun <eryk...@gmail.com> added the comment:
<snark> We could extend bool with shades of grey that close the 2-bit, signed set over the complement: {-2, -1, 0, 1}. For example, the bitwise complement of False could be RealNews (-1, 0x11) and the bitwise complement of True could be FakeNews (-2, 0x10). The bool() value some of built-in objects could be declared as RealNews or FakeNews by decree of the steering committee. For other projects this would have to be subject to opinion, which will probably lead to endless internal debates and flame wars. In a boolean context, FakeNews would be falsey and RealNews would be truthy. For bitwise operations, we have the following: ~False -> RealNews ~True -> FakeNews False & FakeNews -> False False & RealNews -> False True & FakeNews -> False True & RealNews -> True RealNews & FakeNews -> FakeNews False | FakeNews -> FakeNews False | RealNews -> RealNews True | FakeNews -> RealNews True | RealNews -> RealNews RealNews | FakeNews -> RealNews False ^ FakeNews -> FakeNews False ^ RealNews -> RealNews True ^ FakeNews -> RealNews True ^ RealNews -> FakeNews RealNews ^ FakeNews -> True </snark> ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37831> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com