Message133173
In zope.interface, you have something the following construct:
class InterfaceBase:
pass
Interface = InterfaceBase()
Using the above Interface as a derivation base for your own classes, will make that instance a type derived class:
class IFoo(Interface):
pass
type(IFoo)
-> Interface
type(Interface)
-> type
I wonder why this behavior is not documented in the official documentation, or at least, I was unable to find it there... |
|
Date |
User |
Action |
Args |
2011-04-06 21:55:21 | carsten.klein | set | recipients:
+ carsten.klein, docs@python |
2011-04-06 21:55:21 | carsten.klein | set | messageid: <1302126921.15.0.0291977163306.issue11789@psf.upfronthosting.co.za> |
2011-04-06 21:55:20 | carsten.klein | link | issue11789 messages |
2011-04-06 21:55:20 | carsten.klein | create | |
|