Currently ~False is -1 and ~True is -2. Would be nicer if ~bool was the
same as not bool. Hopefully nobody actually relies on this but
nevertheless, it would be a backwards-incompatible change so the whole
deprecation warnings and whatnot would be required.
In particular, this is nice for xnor operator: a ^~ b. This currently
works on ints, but not on bools, while most other operators, including
xor, do successfully work on bools.
_______________________________________________
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/PTIKNJRKI33UEC62UDJOR5N6WOENU6PB/
Code of Conduct: http://python.org/psf/codeofconduct/