copying classes?

Bob Van Zant bvanzant at asyncfs.com
Wed Dec 29 13:42:26 EST 2004


copy.deepcopy() should do the trick. This URL answers a little bit of
your question about the difficulties in copying "complex" data
structures.

http://pydoc.org/2.3/copy.html

-Bob

On Wed, 2004-12-29 at 19:29 +0100, harold fellermann wrote:
> Hi all,
> 
> In the documentation of module 'copy' it is said that "This version 
> does not copy types like module, class, function, method, stack trace, 
> stack frame, file, socket, window, array, or any similar types."
> 
> Does anyone know another way to (deep)copy objects of type class? What 
> is special about the objects of these types that they cannot be easily 
> copied?
> 
> Any help appreciated,
> 
> - harold -
> 
> 
> --
> I like pigs. Dogs look up to us. Cats look down to us.
> Pigs treat us as equal.
> -- Winston Churchill
> 




More information about the Python-list mailing list