Elegant copy-by-value

Martin Christensen knightsofspamalot-factotum at gvdnet.dk
Wed Jan 15 17:47:22 EST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Mike" == Mike Meyer <mwm at mired.org> writes:
Mike> If it still bothers you, how about a PEP proposing that object
Mike> have copy and deepcopy methods that DTRT? That way, all
Mike> new-style classes would have a copy and deepcopy methods, so you
Mike> could invoke them without having to import a module.

If the choice is between importing a module when it's necessary to do
a copy-by-value and implementing it for all classes, I'm not certain
that I'd prefer the latter. As some others have mentioned,
copy-by-value is not something very many people will need every day,
and if they do it'll often be because they don't take proper advantage
of the language. No PEP from me, at least not as it stands now.

Martin

- -- 
Homepage:       http://www.cs.auc.dk/~factotum/
GPG public key: http://www.cs.auc.dk/~factotum/gpgkey.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using Mailcrypt+GnuPG <http://www.gnupg.org>

iEYEARECAAYFAj4l5PoACgkQYu1fMmOQldUHRACghlYkborv7gQR6zHBs7vHvIMW
5icAn3nMXBv4ekOx9nfVLLRKhczKf9S9
=dXgl
-----END PGP SIGNATURE-----




More information about the Python-list mailing list