Answers for "changing instance through dict changes all instances"

1

changing instance through dict changes all instances

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
Posted by: Guest on April-05-2020

Code answers related to "changing instance through dict changes all instances"

Python Answers by Framework

Browse Popular Code Answers by Language