Package motherhamster :: Module enums :: Class Enum

Class Enum



object --+
         |
        Enum

this gives you a compact notation for defining a canonical set of 
string values and naming their context. It's superior to the nifty little:
    a, b, c = ["a", "b", "c"]
trick because the set of enumerated values is an object itself (Enum)
which can be iterated & return a count and all that good stuff 



Instance Methods
 
__init__(self, *values)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__contains__(self, item)
 
__iter__(self)
 
__len__(self)
 
__getitem__(self, key)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, *values)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)