SimpleGenericMap#
- class lsst.afw.typehandling.SimpleGenericMap(*args, **kwargs)#
Bases:
MutableGenericMapA
dict-likeMutableMappingfor use when sharing a map between C++ and Python.For compatibility with C++,
SimpleGenericMaphas the following restrictions:all keys must be of the same type
values must be built-in types or subclasses of
lsst.afw.typehandling.Storable. Almost any user-defined class in C++ or Python can haveStorableas a mixin.
As a safety precaution,
Storableobjects that are added from C++ may be copied when you retrieve them from Python, making it impossible to modify them in-place. This issue does not affect objects that are added from Python, or objects that are always passed byshared_ptrin C++.Parameters#
mapping :
collections.abc.Mapping, optional iterable : iterable, optional dtype :type, optionalThe type of key the map accepts. Not required if
mappingoriterableis provided.- **kwargs
Aside from the
dtypekeyword, aSimpleGenericMaptakes the same input arguments asdict.
Attributes Summary
Methods Summary
fromkeys(iterable[, value])Attributes Documentation
- TEMPLATE_DEFAULTS = (None,)#
- TEMPLATE_PARAMS = ('dtype',)#
Methods Documentation
- classmethod fromkeys(iterable, value=None)#