On 7/16/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > The object returned by __prepare__() actually *is* incorporated into > the class object, unless the metaclass' __new__() passes something > else to type.__new__(). However this isn't obvious when you ask for > the class' __dict__ attribute: you always get a dict proxy.
I take it back. The object is copied, for the reasons Phillip explained. There is no way around this without writing C code, as the only way to create a type object from Python is to call type.__new__() -- the __new__() method if a subclass of type still must call type's __new__() method to create the actual object. (Embarrassed, since I wrote all the code involved.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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
