|
||||
|
Hi there, Thanks for your input with my last request. Seeing the original code was borrowed I decided to rework it with a more fluid design, however the following simplified version puzzles me. Can someone please explain to me why "z" is populating cross instances of the same class. I have been banging my head against the wall for days on this and I don't think I know enough about python to explain it happening. I realize that this is bad design, but it is obviously doing this for a reason. And well I'd really like to know the reason ( so I can avoid it in the future :) Not only does z save state between instances. It's also changing the attribute of the original instance like they are sharing the same memory place. Well that must be what is happening. So I know how to replicate it, and I know how to not replicate... I just understand why. at will...
PS: I'm running a 2.2.3 interpretor if that makes a different. |
||||
|
|
