This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author The Blue Wizard
Recipients The Blue Wizard, docs@python
Date 2019-08-11.02:54:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In Python Language Reference (version 3.7), section 6.9 it states that the arguments of binary bitwise operators must be integers. However, the following expressions work without error:

    True & False
    False | True
    True ^ True

Each produces a boolean result (not integer) (False, True, False, respectively). Also I find that mixing booleans and integers does work too, though this time it produces integers.

One can easily test it on Python home page's console window. I also tested it on my Linux box running version 3.5.3. So it appears that it has been overlooked for quite some time!

As an aside: I do assume that boolean values are *distinct* from integers. If they are not, then my apologies!
Date User Action Args
2019-08-11 02:54:30The Blue Wizardsetrecipients: + The Blue Wizard, docs@python
2019-08-11 02:54:30The Blue Wizardsetmessageid: <>
2019-08-11 02:54:30The Blue Wizardlinkissue37818 messages
2019-08-11 02:54:30The Blue Wizardcreate