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

Guido van Rossum guido at python.org
Fri Apr 8 11:42:52 EDT 2016

DeprecationWarning every time you use ~ on a bool? That would still be
too big a burden on using it the new way.

On Fri, Apr 8, 2016 at 8:27 AM, Random832 <random832 at fastmail.com> wrote:
> On Fri, Apr 8, 2016, at 11:00, Guido van Rossum wrote:
>> The thing here is, this change is too small to warrant a __future__
>> import. So we're either going to introduce it in 3.6 and tell people
>> about it in case their code might break, or we're never going to do
>> it.  I'm honestly on the fence, but I feel this is a rarely used
>> operator so changing its meaning is not likely to break a lot of code.
> What about just having a DeprecationWarning, but no __future__ import?
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list