Object reference

class presets.Preset(module, dispatch=None, defaults=None)[source]

The Preset class overrides the default parameters of functions within a module.

If the given module contains submodules, these are also encapsulated by Preset objects that share the same default parameter dictionary.

Submodules are detected by examining common prefixes of the module source paths.

Attributes:
modulePython module

The module to encapsulate

dispatchNone or dictionary

A dictionary mapping modules to existing Preset objects. This should be left as None for most situations.

defaultsNone or dictionary

An existing dictionary object used to collect default parameters. Note: this will be passed by reference.

Methods

keys()

Return a list of currently set parameter defaults.

update(D)

Update the default parameter set with the provided dictionary D.

keys()[source]

Return a list of currently set parameter defaults.

update(D)[source]

Update the default parameter set with the provided dictionary D.