
Dec. 15, 2009
10:24 p.m.
cool-RR wrote:
With the __deepcopy__ method, user-defined objects can specify how they will be copied. But it is assumed that you will always want to copy them the same way. What if sometimes you want to copy them in one way and sometimes in another?
Then you need to define your own system of copying methods and implement them appropriately for the classes they apply to. The deepcopy mechanism is only designed to cover simple cases. It isn't, and can't be, all things to all people. -- Greg