Package topo :: Package param :: Class Enumeration
[hide private]
[frames] | no frames]

Class Enumeration

source code

             object --+    
                      |    
parameterized.Parameter --+
                          |
                         Enumeration

Enumeration is a Parameter with a list of available values.

An Enumeration's value is always one from its list of available values.

Nested Classes [hide private]

Inherited from parameterized.Parameter: __metaclass__

Instance Methods [hide private]
 
__init__(self, default=None, available=[], **params)
Create an Enumeration, checking that 'default' is in 'available'.
source code
 
__set__(self, obj, val)
Set to the given value, raising an exception if that value is not in the list of available ones.
source code
 
__check_value(self, val)
Raises an error if the given value isn't in the list of available ones.
source code

Inherited from parameterized.Parameter: __delete__, __get__, __getstate__, __setstate__

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

Class Variables [hide private]
  __classdoc = '\n Enumeration is a Parameter with a list of ...
str(object) -> string
Properties [hide private]
  available

Inherited from parameterized.Parameter: constant, default, doc, instantiate, precedence, readonly

Inherited from object: __class__

Method Details [hide private]

__init__(self, default=None, available=[], **params)
(Constructor)

source code 
Create an Enumeration, checking that 'default' is in 'available'.
Overrides: object.__init__

__set__(self, obj, val)

source code 
Set to the given value, raising an exception if that value is not in the list of available ones.
Overrides: parameterized.Parameter.__set__

Class Variable Details [hide private]

__classdoc

str(object) -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.

Value:
'''
    Enumeration is a Parameter with a list of available values.

    An Enumeration\'s value is always one from its list of available values.
    '''