Elegant copy-by-value

Peter Hansen peter at engcorp.com
Sun Jan 12 21:19:58 EST 2003


Andrew Bennetts wrote:
> 
> In which case, perhaps all they want is the following code:
> 
>      from copy import copy, deepcopy
>      __builtins__.copy = copy
>      __builtins__.deepcopy = deepcopy

Added to a file called sitecustomize.py somewhere in the set
of directories in sys.path...

(This makes it automatic on startup, as noted in site.py.)

-Peter




More information about the Python-list mailing list