This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pwerneck
Date 2005-09-19.00:42:16
SpamBayes Score
Marked as misclassified
Logged In: YES 

Yes. I think this confusion was caused because of the lack
of documentation on this topic, especially on the case
described here, which seems to break some rules. 

Since the "Unifying types and classes" essay seems to be the
most used Python document about this topic and, I suggest
the first rule on determining a metaclass be changed from:

"If dict['__metaclass__'] exists, it is used."

To something like:

"If dict['__metaclass__'] exists and is equal to, or a
subclass of, each of the metaclasses of the bases, it is
used; if it exists and is a base class of any metaclass of
the bases, the most specialized metaclass in the hierarchy
is used; if it exists and doesn't satisfies any of these
constraints, TypeError is raised."
Date User Action Args
2007-08-23 14:34:38adminlinkissue1294232 messages
2007-08-23 14:34:38admincreate