On Feb 10, 2008 9:22 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On Feb 9, 2008 8:58 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> > At 07:51 PM 2/8/2008 -0500, Raymond Hettinger wrote:
> > >I recommend dropping the dict.copy() method from Py3.0.
> > >
> > >* We can already write:  newd = copy.copy(d).
> > >* We can also write:     newd = dict(d)
> > >* Both of those approaches also work for most other containers.
> >
> > I'm not fond of this idea.  dict.copy() is polymorphic -- but dict(d) isn't.
> >
> > copy.copy() is polymorphic, but requires an import, which means the
> > path of least resistance will be to use dict(d)...  which will then
> > turn non-dictionaries into dictionaries.
> >
> > If copy.copy() were a builtin and the "one obvious way" to copy
> > containers, +1.  Otherwise, -0.5.
>
> On second thought, I'm with Phillip here, for exactly the reasons he
> states. Let's leave copy() alone.

Maybe copy.copy() could become __builtin__.copy()?  I know everyone
hates adding builtins, but it is commonly needed functionality, it has
__special_method__ support, and putting it in builtins would allow us
to simplify the set() and dict() APIs...

STeVe
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to