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
Recipients
Date 2005-09-18.01:07:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In a simple class hierarchy, I have class A with
metaclass M_A and class B, subclass of A, with
metaclass M_B, subclass of M_A, as required.

A new class C, subclass of B, must have M_B or a
subclass of it as subclass, or a TypeError, metaclass
conflict exception is raised. The exception is raised
in a multiple class hierarchy (diamond, trees, etc) or
in a single class hierarchy when using a metaclass with
no relation to M_A and M_B. 

If M_A or type are used as C metaclass, the interpreter
is ignoring dict['__metaclass__'], which has priority
over B.__class__ and using M_B, when it was supposed to
raise TypeError, with the "metaclass conflict" error
message.

More details in attached file.
History
Date User Action Args
2007-08-23 14:34:38adminlinkissue1294232 messages
2007-08-23 14:34:38admincreate