Copy operator (was list.remove for Noivces)
jeff at ccvcorp.com
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__
> 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. :)
More information about the Python-list