[Python-ideas] Changing the meaning of bool.__invert__

Random832 random832 at fastmail.com
Thu Apr 7 16:08:37 EDT 2016


On Thu, Apr 7, 2016, at 16:05, Terry Reedy wrote:
> Given that ~bool hardly make any sense currently, I would not expect it 
> to be in much use now.  Hence not much to break.

I suspect the fear is of one being passed into a place that expects an
int, and staying alive as a bool (i.e. not being converted to an int by
an arithmetic operation) long enough to confuse code that is trying to
do ~int.


More information about the Python-ideas mailing list