| Trees | Index | Help |
|
|---|
| Package zope :: Package interface :: Module interface :: Class SpecificationBasePy |
|
object --+
|
SpecificationBasePy
Specification| Method Summary | |
|---|---|
Do instances of the given class implement the interface? | |
Is the interface the same as or extend the given interface | |
Is the interface implemented by an object | |
| Inherited from object | |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Class Variable Summary | |
|---|---|
Implements |
__implemented__ = <implementedBy zope.interface.interfac...
|
ClassProvides |
__providedBy__ = <zope.interface.declarations.ClassProvi...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
| Method Details |
|---|
implementedBy(self, cls)Do instances of the given class implement the interface? |
isOrExtends(self, interface)Is the interface the same as or extend the given interface Examples:>>> from zope.interface import Interface >>> from zope.interface.declarations import Declaration >>> class I1(Interface): pass ... >>> class I2(I1): pass ... >>> class I3(Interface): pass ... >>> class I4(I3): pass ... >>> spec = Declaration() >>> int(spec.extends(Interface)) 0 >>> spec = Declaration(I2) >>> int(spec.extends(Interface)) 1 >>> int(spec.extends(I1)) 1 >>> int(spec.extends(I2)) 1 >>> int(spec.extends(I3)) 0 >>> int(spec.extends(I4)) 0 |
providedBy(self, ob)Is the interface implemented by an object>>> from zope.interface import * >>> class I1(Interface): ... pass >>> class C(object): ... implements(I1) >>> c = C() >>> class X(object): ... pass >>> x = X() >>> I1.providedBy(x) False >>> I1.providedBy(C) False >>> I1.providedBy(c) True >>> directlyProvides(x, I1) >>> I1.providedBy(x) True >>> directlyProvides(C, I1) >>> I1.providedBy(C) True |
| Class Variable Details |
|---|
__implemented__
|
__providedBy__
|
__provides__
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Fri Jun 24 12:01:24 2005 | http://epydoc.sf.net |