Message5310

Author alex.gronholm
Recipients alex.gronholm
Date 2009-11-13.13:21:40
SpamBayes Score 0.000126159
Marked as misclassified No
Message-id <1258118501.82.0.601721340382.issue1504@psf.upfronthosting.co.za>
In-reply-to
Content
Seems like inheriting from the same interface twice causes problems.
ComboBoxModel is a subinterface of ListModel.
The following code should work but doesn't:

from javax.swing import ListModel
from javax.swing import ComboBoxModel

class A(ListModel): pass
class B(A, ComboBoxModel): pass
class C(B): pass

TypeError: Error when calling the metaclass bases
    Cannot create a consistent method resolution
order (MRO) for bases B[<class '__main__.A'>, <type
'org.python.proxies.__main__$B$2'>]

What I really can't understand is why it only barfs at "class C(...)"
and not when creating the "problem" type (B).
History
Date User Action Args
2009-11-13 13:21:42alex.gronholmsetrecipients: + alex.gronholm
2009-11-13 13:21:41alex.gronholmsetmessageid: <1258118501.82.0.601721340382.issue1504@psf.upfronthosting.co.za>
2009-11-13 13:21:41alex.gronholmlinkissue1504 messages
2009-11-13 13:21:40alex.gronholmcreate