Package buildbot :: Package util :: Class ComparableMixin
[frames] | no frames]

Class ComparableMixin

source code

Known Subclasses:

Specify a list of attributes that are 'important'. These will be used for all comparison operations.

Instance Methods
__hash__(self) source code
__cmp__(self, them) source code
Object Specification Descriptor
source code
Special descriptor for class __provides__
Class Variables
  compare_attrs = []
  __implemented__ = <implementedBy buildbot.util.ComparableMixin>
Method Details


Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

For example:

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

  >>> [i.getName() for i in C().__provides__]