New submission from Sasha B <[email protected]>:
Not sure if this is predicted behaviour, but if I make a dict like:
>>> x = {0: 'bar', True: 'foo'}
and modify True with 1, or 0 with False:
>>> x[False] = 'boo'
>>> x[1] = 'far'
the modifications happen:
>>> x
{0: 'boo', True: 'far'}
Is this expected behaviour? It seems that the hashes for 'False' and 0 are
confused, as are the hashes for 'True' and 1.
----------
messages: 161497
nosy: sbermeister
priority: normal
severity: normal
status: open
title: Dict collision on boolean and integer values
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14898>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com