On Sat, Jun 11, 2011 at 21:39, Terry Reedy <tjre...@udel.edu> wrote: > What may not be obvious from the docs is that the metaclass calculation > described in the doc section on class statements is carried out within > type.__new__ (or after a possible patch, called from within that), so that > type calls are really "a dynamic form of the class statement" even when > another another metaclass is specified or implied. "Return a new type > object." includes instances of type subclasses. I am not sure what happens > with metaclasses that are not type subclasses. There is at least one bug > report about the metaclass calculation, which is why I happen to have read > the typeobject.__new__ code. But I have not read the build-class code and > all the details of class creation. So I may have some of the details above > wrong.
Just for the record, I think this is the mentioned bug: http://bugs.python.org/issue1294232 Daniel -- http://mail.python.org/mailman/listinfo/python-list