Package zope :: Package interface :: Module declarations :: Class ObjectSpecificationDescriptorPy
[show private | hide private]
[frames | no frames]

Type ObjectSpecificationDescriptorPy

object --+
         |
        ObjectSpecificationDescriptorPy


Implement the __providedBy__ attribute

The __providedBy__ attribute computes the interfaces peovided by an object.


Method Summary
  __get__(self, inst, cls)
Get an object specification for an object
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__get__(self, inst, cls)

Get an object specification for an object

For example:

>>> from zope.interface import Interface
>>> class IFoo(Interface): pass
...
>>> class IFooFactory(Interface): pass
...
>>> class C(object):
...   implements(IFoo)
...   classProvides(IFooFactory)
>>> [i.getName() for i in C.__providedBy__]
['IFooFactory']
>>> [i.getName() for i in C().__providedBy__]
['IFoo']

Generated by Epydoc 2.1 on Fri Jun 24 12:01:21 2005 http://epydoc.sf.net