Bugs item #1294232, was opened at 2005-09-18 01:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1294232&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Type/class unification
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Pedro Werneck (pwerneck)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error in metaclass search order

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1294232&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to