[Python-3000] Nix dict.copy()
Raymond Hettinger
python at rcn.com
Tue Feb 12 04:58:55 CET 2008
Where did we end-up on dict.copy()?
Is the copy(obj) function sufficiently universal to replace the obj.copy() method used in sets and in dict imitators? Or does the
need for import preclude it from consideration?
To me it seems that relationship between __copy__ and the copy() function is just as universal as the relationship between __len__
and len(). Am I missing something that makes d.copy() preferable to copy(d)?
I don't think we'll ever get another chance to clean-up the mapping API and to remove duplicate functionality (the code for
dict.__copy__ and dict.copy share the same implementation).
Raymond
More information about the Python-3000
mailing list