I have the following class
class CommandList( HasTraits ):
command_nr = Int
command_code = Int
command_name = Str
status = Int
settings = None #It will be a list[dic{list[]}]
I'm usind copy.deepcopy
to clone the class
a = copy.deepcopy(b)
but when I'm changing the settings variable in a
than it effects the b
variable. It seems that the deepcopy didn't clone this variable. I read that it is possible to override the __deepcopy__
function. Is it a good idea? How can I do that?