Raymond Hettinger wrote: > [Phillip Eby] >> I'm not fond of this idea. dict.copy() is polymorphic -- but dict(d) is... > > Can't say dict.copy() is really polymorphic if only one other class defines > the method.
Why do you say it's only one? I found atleast UserDict.copy, os._Environ.copy, WeakValueDictionary.copy, WeakKeyDictionary.copy, and test.test_userdict.SeqDict. Notice that UserDict.copy is also polymorphic in the sense that it may return instances of subclasses, by using copy.copy. Regards, Martin _______________________________________________ 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