[Python-3000] Nix dict.copy()

Larry Hastings larry at hastings.org
Mon Feb 11 08:55:43 CET 2008


Greg Ewing wrote:
> Yes, but then I don't see the advantage over just giving the object a copy() method and calling it directly.
>
> In other words, I see little benefit in having copy() be a generic function.
>   

So true!  Other candidates for not being generic functions: len(), 
repr(), str(), int(), complex(), dict(), list(), set()...

So what decides whether something should be a generic function or a 
commonly-defined member function?  Personally I find "historical 
accident" an unsatisfying answer.


/larry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20080210/ae20c536/attachment.htm 


More information about the Python-3000 mailing list