Package param :: Class List
[hide private]
[frames] | no frames]

Class List

source code


Parameter whose value is a list of objects, usually of a specified type.

The bounds allow a minimum and/or maximum length of list to be enforced. If the class is non-None, all items in the list are checked to be of that type.

Nested Classes [hide private]

Inherited from parameterized.Parameter: __metaclass__

Instance Methods [hide private]
 
__init__(self, default=[], class_=None, instantiate=True, bounds=(0, None), **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__set__(self, obj, val)
Set to the given value, raising an exception if out of bounds.
source code
 
_check_bounds(self, val)
Checks that the list is of the right length and has the right contents.
source code
 
_check_type(self, val) source code

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

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

Class Variables [hide private]
  __classdoc = '\n Parameter whose value is a list of objects...
str(object) -> string
Properties [hide private]
  bounds
  class_

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

Inherited from object: __class__

Method Details [hide private]

__init__(self, default=[], class_=None, instantiate=True, bounds=(0, None), **params)
(Constructor)

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

__set__(self, obj, val)

source code 
Set to the given value, raising an exception if out of bounds.
Overrides: parameterized.Parameter.__set__

_check_bounds(self, val)

source code 
Checks that the list is of the right length and has the right contents. Otherwise, an exception is raised.

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:
'''
    Parameter whose value is a list of objects, usually of a specified type.

    The bounds allow a minimum and/or maximum length of
    list to be enforced.  If the class is non-None, all
    items in the list are checked to be of that type.
    '''