lsst.pex.config g364dc83bf4+1d28dfd693
Loading...
Searching...
No Matches
lsst.pex.config.dictField.Dict Class Reference
Inheritance diagram for lsst.pex.config.dictField.Dict:
lsst.pex.config.configDictField.ConfigDict

Public Member Functions

 __init__ (self, Config config, DictField field, Mapping[KeyTypeVar, ItemTypeVar] value, *, list[StackFrame]|None at, str label, bool setHistory=True)
ItemTypeVar __getitem__ (self, KeyTypeVar k)
int __len__ (self)
Iterator[KeyTypeVar] __iter__ (self)
bool __contains__ (self, Any k)
None __setitem__ (self, KeyTypeVar k, ItemTypeVar x, Any at=None, str label="setitem", bool setHistory=True)
None __delitem__ (self, KeyTypeVar k, Any at=None, str label="delitem", bool setHistory=True)
 __repr__ (self)
 __str__ (self)
 __setattr__ (self, attr, value, at=None, label="assignment")
 __reduce__ (self)

Protected Member Functions

Config _config (self)
Dict _copy (self, Config config)

Protected Attributes

 _field = field
 _config_ = weakref.ref(config)
dict _dict = {}
Config _history = self._config._history.setdefault(self._field.name, [])
 _config

Properties

 history = property(lambda x: x._history)

Detailed Description

An internal mapping container.

This class emulates a `dict`, but adds validation and provenance.

Parameters
----------
config : `~lsst.pex.config.Config`
    Config to proxy.
field : `~lsst.pex.config.DictField`
    Field to use.
value : `~typing.Any`
    Value to store.
at : `list` of `~lsst.pex.config.callStack.StackFrame`
    Stack frame for history recording. Will be calculated if `None`.
label : `str`, optional
    Label to use for history recording.
setHistory : `bool`, optional
    Whether to append to the history record.

The documentation for this class was generated from the following file:
  • python/lsst/pex/config/dictField.py