Jan-10-2021, 12:27 PM
It would help to have the whole error message, so we can see where this is happening.
I believe the issue is the way Python handles variable names. a=b does not copy b to a, rather it creates variable a that points to the same value that b does. Changes to that value mean that a and b are both changed. Usually. Unless the operation results in a reassignment that separates the two.
Sounds confusing, would refer you to a Pycon talk by Ned Batchelder PyCon 2015
I believe the issue is the way Python handles variable names. a=b does not copy b to a, rather it creates variable a that points to the same value that b does. Changes to that value mean that a and b are both changed. Usually. Unless the operation results in a reassignment that separates the two.
Sounds confusing, would refer you to a Pycon talk by Ned Batchelder PyCon 2015