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

Class Callable

source code

             object --+    
                      |    
parameterized.Parameter --+
                          |
                         Callable
Known Subclasses:

Parameter holding a value that is a callable object, such as a function.

A keyword argument instantiate=True should be provided when a function object is used that might have state. On the other hand, regular standalone functions cannot be deepcopied as of Python 2.4, so instantiate must be False for those values.

Nested Classes [hide private]

Inherited from parameterized.Parameter: __metaclass__

Instance Methods [hide private]
 
__init__(self, default=None, **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__set__(self, obj, val)
Set the value for this Parameter.
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 Parameter holding a value that is a callab...
str(object) -> string
Properties [hide private]

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

Inherited from object: __class__

Method Details [hide private]

__init__(self, default=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 the value for this Parameter.

If called for a Parameterized class, set that class's value (i.e. set this Parameter object's 'default' attribute).

If called for a Parameterized instance, set the value of this Parameter on that instance (i.e. in the instance's __dict__, under the parameter's internal_name).

If the Parameter's constant attribute is True, only allows the value to be set for a Parameterized class or on uninitialized Parameterized instances.

If the Parameter's readonly attribute is True, only allows the value to be specified in the Parameter declaration inside the Parameterized source code. A read-only parameter also cannot be set on a Parameterized class.

Note that until we support some form of read-only object, it is still possible to change the attributes of the object stored in a constant or read-only Parameter (e.g. the left bound of a BoundingBox).

Overrides: parameterized.Parameter.__set__
(inherited documentation)

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 holding a value that is a callable object, such as a function.
    
    A keyword argument instantiate=True should be provided when a
    function object is used that might have state.  On the other hand,
    regular standalone functions cannot be deepcopied as of Python
    2.4, so instantiate must be False for those values.
    '''