There are no attributes in this class.
implementedBy(...)
Test whether the specification is implemented by a class or factory. Raise TypeError if argument is neither a class nor a callable.
isOrExtends(...)
Test whether a specification is or extends another
providedBy(...)
Test whether an interface is implemented by the specification
changed(originally_changed)
extends(interface, strict=True)
Does the specification extend the given interface?
Test whether an interface in the specification extends 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)) 1 >>> 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 >>> I2.extends(I2) 0 >>> I2.extends(I2, False) 1 >>> I2.extends(I2, strict=False) 1
flattened()
Return an iterator of all included and extended interfaces
for example:
>>> from zope.interface import Interface >>> class I1(Interface): pass ... >>> class I2(I1): pass ... >>> class I3(Interface): pass ... >>> class I4(I3): pass ... >>> spec = Declaration(I2, I3) >>> spec = Declaration(I4, spec) >>> i = spec.flattened() >>> i.next().getName() 'I4' >>> i.next().getName() 'I2' >>> i.next().getName() 'I1' >>> i.next().getName() 'I3' >>> i.next().getName() 'Interface' >>> list(i) []
get(name, default=None)
Query for an attribute description
interfaces()
Return an iterator for the interfaces in the specification
for example:
>>> from zope.interface import Interface >>> class I1(Interface): pass ... >>> class I2(I1): pass ... >>> class I3(Interface): pass ... >>> class I4(I3): pass ... >>> spec = Specification((I2, I3)) >>> spec = Specification((I4, spec)) >>> i = spec.interfaces() >>> i.next().getName() 'I4' >>> i.next().getName() 'I2' >>> i.next().getName() 'I3' >>> list(i) []
subscribe(dependent)
unsubscribe(dependent)
weakref(callback=None)
There are no known subclasses.