lsst.afw gb3a676b8dc+b4feba26a1
|
Public Member Functions | |
fromkeys (cls, iterable, value=None) | |
A `dict`-like `~collections.abc.MutableMapping` for use when sharing a map between C++ and Python. For compatibility with C++, ``SimpleGenericMap`` has 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 have `~lsst.afw.typehandling.Storable` as a mixin. As a safety precaution, `~lsst.afw.typehandling.Storable` objects 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 by :cpp:class:`shared_ptr` in C++. Parameters ---------- mapping : `collections.abc.Mapping`, optional iterable : iterable, optional dtype : `type`, optional The type of key the map accepts. Not required if ``mapping`` or ``iterable`` is provided. **kwargs Aside from the ``dtype`` keyword, a ``SimpleGenericMap`` takes the same input arguments as `dict`.
Definition at line 29 of file _SimpleGenericMap.py.
lsst.afw.typehandling._SimpleGenericMap.SimpleGenericMap.fromkeys | ( | cls, | |
iterable, | |||
value = None ) |
Definition at line 59 of file _SimpleGenericMap.py.