Why are instances of this class being overwritten?
This question already has an answer here:
You are using __init__
method as a class
method.
Using @classmethod
for every method will result in a singleton, that's why the vars overwrite.
上一篇: 在Python中访问类的成员变量?
下一篇: 为什么这个类的实例被覆盖?