On Feb 12, 2008 4:52 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:

> > What useful information do we get by knowing that a type has a .copy()
> > method?
>
> It rules out all classes that don't have one. That's nearly all types.
>

Okay, but turn it around for a minute.  Which types should have a .copy()
method and why?

If I'm making a new copyable type, is there a rule of thumb that helps me
decide on .copy(), .__copy__(), or both?

Rules of "dict and set have a .copy() method" or "mapping types have a
.copy() method" seem... arbitrary.

-- 
Daniel Stutzbach, Ph.D.             President, Stutzbach Enterprises LLC
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
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