Message279969
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. |
|
Date |
User |
Action |
Args |
2016-11-03 07:51:28 | martin.panter | set | recipients:
+ martin.panter, ezio.melotti, saeed |
2016-11-03 07:51:28 | martin.panter | set | messageid: <1478159488.71.0.352234557625.issue28594@psf.upfronthosting.co.za> |
2016-11-03 07:51:28 | martin.panter | link | issue28594 messages |
2016-11-03 07:51:28 | martin.panter | create | |
|