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

Neil Girdhar mistersheik at gmail.com
Tue Apr 19 07:35:40 EDT 2016


I'm +1 on this change because is makes sense as a user.

Note how numpy deals with invert and unsigned integers:

In [2]: a = np.uint8(10)

In [3]: ~a
Out[3]: 245

The result of invert staying within the same type makes sense to me.

(Also, as an idealist, I believe that decoupling int and bool might one day 
many many years from now bring about the ideal of bool not subclassing int.)

Best,

Neil

On Saturday, April 9, 2016 at 12:25:57 PM UTC-4, Guido van Rossum wrote:
>
> Let me pronounce something here. This change is not worth the amount 
> of effort and pain a deprecation would cause everyone. Either we 
> change this quietly in 3.6 (adding it to What's New etc. of course) or 
> we don't do it at all. 
>
> -- 
> --Guido van Rossum (python.org/~guido) 
> _______________________________________________ 
> Python-ideas mailing list 
> Python... at python.org <javascript:> 
> 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/20160419/77642a3b/attachment.html>


More information about the Python-ideas mailing list