[Python-ideas] Adding a `object.__deepcopy__`

Terry Reedy tjreedy at udel.edu
Sun Dec 20 21:19:00 CET 2009

On 12/20/2009 8:54 AM, Ram Rachum wrote:
> Do you think there should be a `__deepcopy__` method for `object`? This will
> solve a little problem I have here:
> 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.

To me, the concept 'deepcopy' only applies to collections, and object 
instances are not collections, hence object.__deepcopy__ would be 

Terry Jan Reedy

More information about the Python-ideas mailing list