[issue26614] False/0 and True/1 collision when used as dict keys?

Ethan Furman report at bugs.python.org
Tue Mar 22 23:11:09 EDT 2016


Ethan Furman added the comment:

False and True are subtypes of int, so the behaviour you are seeing is known and expected.

https://docs.python.org/2/reference/datamodel.html?highlight=bool

In the future feel free to ask on Python-List about behaviour -- you'll be sure to get a plethora of answers.

----------
nosy: +ethan.furman
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26614>
_______________________________________


More information about the Python-bugs-list mailing list