Elegant copy-by-value
Mike Meyer
mwm at mired.org
Sun Jan 12 16:12:41 EST 2003
Martin Christensen <knightsofspamalot-factotum at gvdnet.dk> writes:
> I wasn't thinking of simplicity implementation-wise. It just seems
> very awkward to me that it should be necessary to import a module just
> to be able to copy the value of even a primitive.
If it still bothers you, how about a PEP proposing that object have
copy and deepcopy methods that DTRT? That way, all new-style classes
would have a copy and deepcopy methods, so you could invoke them
without having to import a module.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list
mailing list