Copy operator (was list.remove for Noivces)

Jeff Shannon jeff at
Mon Dec 3 14:09:28 EST 2001

Arthur Siegel wrote:

> Andreas writes -
> >Actually, if you like it your way, you can add this to lines to your
> >import copy,__builtin__
> >__builtin__.copy=copy.copy
> Very cool.
> who knew.

Of course, one should be careful using this sort of thing.

If you then trade code (in which you use copy() ) with someone else, this
will bite you.  Especially if you've made this change and then forgotten
about it.  Or, you made this change, someone else learns using your methods
without being aware that you've made this change, and then that someone else
is totally confused when they can't use copy() elsewhere.

It's a cool trick, and can be very useful at times, but it *is* a trick, and
it's important to be aware of the risks involved.  :)

Jeff Shannon
Credit International

More information about the Python-list mailing list