| Home | Trees | Index | Help |
|---|
object --+
|
SpecificationBasePy
Specification| Method Summary | |
|---|---|
Test whether the specification is implemented by a class or factory. | |
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 | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
Return repr(x)... | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... | |
| Class Variable Summary | |
|---|---|
Implements |
__implemented__ = <implementedBy gnue.navigator.external...
|
ClassProvides |
__providedBy__ = <gnue.navigator.external.zope.interface...
|
ClassProvides |
__provides__ = <gnue.navigator.external.zope.interface.d...
|
| Method Details |
|---|
implementedBy(self, cls)Test whether the specification is implemented by a class or factory. Raise TypeError if argument is neither a class nor a callable. |
isOrExtends(self, interface)Is the interface the same as or extend the given interface Examples:>>> from gnue.navigator.external.zope.interface import Interface >>> from gnue.navigator.external.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 gnue.navigator.external.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__
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Sun Nov 30 23:03:54 2008 | http://epydoc.sf.net |