Christian Heimes <li...@cheimes.de> added the comment:

This is the expected behavior. The bool type is a subtype of int. True is int 1 
in disguise and False is int 0.

>>> bool.__mro__
(<class 'bool'>, <class 'int'>, <class 'object'>)

>>> True == 1
True
>>> True == 2
False

>>> False == 0
True

----------
nosy: +christian.heimes

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45891>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to