KeyValueRegistry
- class jwst.associations.lib.keyvalue_registry.KeyValueRegistry(items=None, default=None)[source]
Bases:
UserDictProvide a dict-like registry.
Differences from just a
dict:Can be given single item or a 2-tuple. If an item, attempts to read the
__name__attribute and use that as the key.If None is given as a key, a default key can be specified.
Instances can be used as decorators.
- Parameters:
- itemsobject or (str, object) or dict
Initializing items.
- defaultstr or object
The default to use when key is
None.
Methods Summary
__call__(item)Add item by calling instance.
update(item)Add item to registry.
Methods Documentation