Set the method used to create model component identifiers.

When a model component is created, the default behavior is to add the component to the default Python namespace. This is controlled by a function which can be changed with this routine.

Parameters:func (function reference) – The function to use: this should accept two arguments, a string (component name), and the model instance.

See also

Create a model component.
Return the method used to create model component identifiers
Set the source model expression for a data set.


The default assignment function first renames a model component to include the model type and user-defined identifier. It then updates the ‘__main__’ module’s dictionary with the model identifier as the key and the model instance as the value. Similarly, it updates the ‘__builtin__’ module’s dictionary just like ‘__main__’ for compatibility with IPython.