Martin Panter added the comment:

I haven’t looked at your code, but I think you may have misunderstood how 
variable assignments work in Python. See 
<https://docs.python.org/3.5/faq/programming.html#why-did-changing-list-y-also-change-list-x>.

When you assign an object such as [0, 0] to a variable name, the name is 
“bound” to the object. When you assign to a second name, the second name is 
bound to exactly the same object. When you alter the object through one name, 
the change is visible from any of the bound names.

Closing this, but let me know if I got it wrong.

----------
nosy: +martin.panter
resolution:  -> not a bug
status: open -> closed

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

Reply via email to