[Python-ideas] 1 + True = 2
Giampaolo Rodola'
g.rodola at gmail.com
Sun Jun 5 12:37:48 EDT 2016
>>> 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?
--
Giampaolo - http://grodola.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160605/71c9deaf/attachment.html>
More information about the Python-ideas
mailing list