[Python-ideas] Being able to specify "copy mode" to copy.deepcopy

Jacob Holm jh at improva.dk
Tue Dec 15 17:17:35 CET 2009

Ram Rachum wrote:
> I agree it that the Persistent.__deecopy__ thing does smell like misuse on my 
> part. However I'd be happy to hear any alternative suggestion you have on how
> to solve the problem I have.
> Meanwhile, I thought of a nice backwards-compatible way to implement what I 
> suggest, but I want to know whether this idea makes sense at all to the people 
> here.

It is already quite easy to abuse the "memo" dict argument of 
copy.deepcopy to pass this kind of flag to the __deepcopy__ methods. 
What else do you need?

  - Jacob

More information about the Python-ideas mailing list