Module vopu :: Class OrderedByCreation
[show private | hide private]
[frames | no frames]

Type OrderedByCreation

object --+
         |
        OrderedByCreation


Base class for objects which are ordered by their creation time.

>>> a = OrderedByCreation()
>>> b = OrderedByCreation()
>>> c = OrderedByCreation()
>>> a < b
True
>>> b < c
True
>>> all = [b, c, a]
>>> all.sort()
>>> all == [a, b, c]
True

Method Summary
  __init__(self, *args, **kwargs)
Create a new OrderedByCreation object.
  __cmp__(self, other)
Compare two OrderedByCreation objects by their creation time.
    Inherited from object
  __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

__init__(self, *args, **kwargs)
(Constructor)

Create a new OrderedByCreation object.

Overrides:
__builtin__.object.__init__

__cmp__(self, other)
(Comparison operator)

Compare two OrderedByCreation objects by their creation time.

>>> a = OrderedByCreation()
>>> b = OrderedByCreation()
>>> c = OrderedByCreation()
>>> cmp(a, b)
-1
>>> cmp(b, b)
0
>>> cmp(c, b)
1

Generated by Epydoc 2.1 on Sun Aug 31 15:41:30 2008 http://epydoc.sf.net