ConfigurableActionStruct¶
- class lsst.pex.config.configurableActions.ConfigurableActionStruct(config: Config, field: ConfigurableActionStructField, value: Mapping[str, ConfigurableAction], at: Any, label: str)¶
Bases:
Generic[ActionTypeVar]A ConfigurableActionStruct is the storage backend class that supports the ConfigurableActionStructField. This class should not be created directly.
This class allows managing a collection of
ConfigurableActionwith a struct like interface, that is to say in an attribute like notation.- Parameters:
- config
Config Config to use.
- field
ConfigurableActionStructField Field to use.
- value
Mapping[str,ConfigurableAction] Value to assign.
- at
listofStackFrameorNone, optional Stack frames to use for history recording.
- label
str, optional Label to use for history recording.
- config
Notes
Attributes can be dynamically added or removed as such:
ConfigurableActionStructInstance.variable1 = a_configurable_action del ConfigurableActionStructInstance.variable1
Each action is then available to be individually configured as a normal
lsst.pex.config.Configobject.ConfigurableActionStructsupports two special convenience attributes.The first is
update. You may assign a dict ofConfigurableActionor aConfigurableActionStructto this attribute which will update theConfigurableActionStructon which the attribute is invoked such that it will be updated to contain the entries specified by the structure on the right hand side of the equals sign.The second convenience attribute is named
remove. You may assign an iterable of strings which correspond to attribute names on theConfigurableActionStruct. All of the corresponding attributes will then be removed. If any attribute does not exist, anAttributeErrorwill be raised. Any attributes in the Iterable prior to the name which raises will have been removed from theConfigurableActionStructAttributes Summary
Methods Summary
items()Attributes Documentation
- fieldNames¶
- history¶
- remove = None¶
- update = None¶
Methods Documentation