[Python-ideas] 1 + True = 2

Terry Reedy tjreedy at udel.edu
Sun Jun 5 15:53:31 EDT 2016


On 6/5/2016 12:37 PM, Giampaolo Rodola' wrote:
>>>> 1 + True
> 2
>>>> 1 + False
> 1
>>>>
>
> I bumped into this today by accident and I can't recall ever being aware
> of this. Why isn't this a TypeError in Python 3?

Questions like this belong on python-list (where it has been discussed 
before).

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list