How to dervie from an instance object?

reinsn reinhold.strobl at gmail.com
Thu Mar 9 05:01:25 EST 2006


Hi,

I am currently working with ZopeX3. Because python doesn't include
concept of interfaces, those were defined by the module zope.interface.

So interfaces were defined like:

class IMyInterface(zope.interface.Interface):
   .....


I have looked into the module zope.interface and found, that
zope.interface.Interface is an object instance and no class object! But
how does this work? How can I derive from an object instance?

I mean is something like this possible in Python?

class X: pass

x = X()

class Y (x):
  .....


Thanks for the replies in advance!




More information about the Python-list mailing list