📜  通过 dict 更改实例会更改所有实例 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:33.449000             🧑  作者: Mango

代码示例1
class Myclass:
    SOME_ARRAY = []
    def __init__(self):
      self.SOME_ARRAY2 = []
    
#SOME_ARRAY has the same adress across all instances of the class.
#SOME_ARRAY2 has a specific adress for each instance