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

Guido van Rossum guido at python.org
Thu Apr 7 13:23:59 EDT 2016

Nothing else is on the table. Seriously. Stop hijacking the thread.

--Guido (mobile)
On Apr 7, 2016 10:18 AM, "Ethan Furman" <ethan at stoneleaf.us> wrote:

> On 04/07/2016 09:38 AM, Guido van Rossum wrote:
> Honestly I think that the OP has a point, and I don't think we have to
>> bend over backwards to preserve int compatibility. After all str(True)
>> != str(1), and surely there are other examples.
> I think the str() of a value, while possibly being the most interesting
> piece of information (IntEnum, anyone?), is hardly the most intrinsic.
> If we do make this change, besides needing a couple major versions to make
> it happen, will anything else be different?
> - no longer subclass int?
> - add an "unknown" value?
>   - how will indexing work?
>   - or any of the other operations?
> - don't bother with any of the other mathematical operations?
>   - counting True's is not the same as adding True's
> I'm not firmly opposed, I just don't see a major issue here -- I've needed
> an Unknown value for more often that I've needed ~True to be False.
> --
> ~Ethan~
> _______________________________________________
> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160407/80ff002e/attachment.html>

More information about the Python-ideas mailing list