Hi,

I am wondering what the best way is to get the most specific interface
is from a class.

Relying on the first interface returned from 'implementedBy()' doesn't
feel right. I've found another post asking roughly this question that
uses 'queryType' [1], however that doesn't seem to be available these
days.

class IMyFoo(Interface):
   ...

class MyFoo(Bar):
   implements(IMyFoo)
   ...

>>> [x.__name__ for x in implementedBy(MyFoo)]
['IMyFoo', 'IBarFoo', ... ]

I want some reliable way of returning 'IMyFoo' but can't seem to find it...

Thanks,
Paul

[1] http://mail.zope.org/pipermail/zope3-dev/2005-September/015774.html
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to