http://stackoverflow.com/questions/1933621/deepcopy-a-simple-python-object
I also think it's a more elegant solution than the way it works now.
Ram.
_______________________________________________
Python-ideas mailing list
Python...@python.org
http://mail.python.org/mailman/listinfo/python-ideas
> Do you think there should be a `__deepcopy__` method for `object`?
No. Deep copy is an ill-defined concept. There is no universal notion
of a deep copy, various applications need different amount of copying.
Also, various applications need different amount of sharing and cycle
detection while copying. There is no universal solution which fits
all.
Use a domain-specific function instead.
--
Marcin Kowalczyk
To me, the concept 'deepcopy' only applies to collections, and object
instances are not collections, hence object.__deepcopy__ would be
non-sensical.
Terry Jan Reedy