[issue39338] Data lost randomly from dictionary after creating the dictionary

Zachary Ware report at bugs.python.org
Tue Jan 14 17:55:49 EST 2020


Zachary Ware <zachary.ware at gmail.com> added the comment:

I suspect your `useAmp` branch is not doing what you think it's doing: it's effectively replacing a random number of entries in your `crazyQuilt2` list with a duplicate entry (try `print`ing the list every time around the main loop to see what's happening to it).  When you later create a dict using the entries of the list as keys there are only so many unique keys, and thus the dict is not the same length as the list.

----------
nosy: +zach.ware
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list