[issue33572] False/True as dictionary keys treated as integers

Janusz Harkot report at bugs.python.org
Fri May 18 11:22:01 EDT 2018


Janusz Harkot <janusz.harkot at gmail.com> added the comment:

Python 3.6.5 (default, Mar 29 2018, 03:28:50)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dta = {False: 'false', True: 'true', 0: 'zero', 1: 'one'}
>>> print(dta[False])
zero
>>> dta
{False: 'zero', True: 'one'}
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33572>
_______________________________________


More information about the Python-bugs-list mailing list