[Python-ideas] Changing the meaning of bool.__invert__
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Apr 8 02:54:33 EDT 2016
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.
But conversely, any code that *is* using ~bool instead of
"not bool" is probably doing it precisely because it
*does* want the integer interpretation.
Why break that code, when "not bool" is available as the
obvious way of getting a logically negated bool?
--
Greg
More information about the Python-ideas
mailing list