lsst.afw g3d779e7deb+3cc41d2aa1
Public Member Functions | List of all members
lsst.afw.typehandling._SimpleGenericMap.SimpleGenericMap Class Reference
Inheritance diagram for lsst.afw.typehandling._SimpleGenericMap.SimpleGenericMap:
lsst.afw.typehandling._GenericMap.MutableGenericMap lsst.afw.typehandling._GenericMap.AutoKeyMeta lsst.afw.typehandling._GenericMap.GenericMap

Public Member Functions

def fromkeys (cls, iterable, value=None)
 

Detailed Description

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.

Member Function Documentation

◆ fromkeys()

def lsst.afw.typehandling._SimpleGenericMap.SimpleGenericMap.fromkeys (   cls,
  iterable,
  value = None 
)

Definition at line 59 of file _SimpleGenericMap.py.


The documentation for this class was generated from the following file: