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

2020-01-14 Thread Tim Peters
Tim Peters added the comment: No problem! If you are trying to swap the values in two variables `x` and `y`, in most languages that's spelled: temp = x x = y y = temp and that works in Python too. But in Python it's more common to do it with a one-liner: x, y = y, x

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

2020-01-14 Thread Y3Kv Bv
Y3Kv Bv added the comment: I'm a newbie at Python, also obviously not thinking hard enough over Python's mechanics. Shame on me. -- ___ Python tracker ___ ___

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

2020-01-14 Thread Tim Peters
Change by Tim Peters : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bug

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

2020-01-14 Thread Tim Peters
Tim Peters added the comment: What, exactly, in the output shows "the problem"? When I run it, the `a == b` part is always True, while `len(x)` and `len(crazyQuilt2)` are always 30. The other three (len(coordinates), len(x2), len(x3)) are always equal to each other, but are monotonically n

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

2020-01-14 Thread Zachary Ware
Zachary Ware 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 i

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

2020-01-14 Thread Y3Kv Bv
New submission from Y3Kv Bv : Windows 7 x64, Python 3.8.1 I've encountered a very weird issue where after creating a dictionary from a list the dictionary ends up being shorter/data is lost from it. It's absolutely random when it loses, how many and which items are lost. I've attached the exa