On Thu, Feb 25, 2021 at 4:28 AM Barry Scott <ba...@barrys-emacs.org> wrote: > > > > On 23 Feb 2021, at 22:10, Steven D'Aprano <st...@pearwood.info> wrote: > > There are exactly 2**4 = 16 boolean operators of two variables. Python > only supports two: `and` and `or`. Plus a single unary operator `not` > (out of four possible unary operators). What makes xnor so special that > you want it to be an operator? > > > Python implements more then 2 of them: > > True > False > not > and > or > > https://en.wikipedia.org/wiki/Boolean_algebras_canonically_defined#Truth_tables >
True and False aren't operators in Python. Notionally you could say that "take any input(s) and return True" could be considered an operator in theory, but you can't write "x True y" to achieve that in Python. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/2JCXDJ6SN5MC2FDLC5QYJMRVDRLXKPDI/ Code of Conduct: http://python.org/psf/codeofconduct/