lsst.afw g8f2ba02de7+0e50281dbb
Public Member Functions | Static Public Attributes | List of all members
lsst.afw.typehandling._GenericMap.MutableGenericMap Class Reference
Inheritance diagram for lsst.afw.typehandling._GenericMap.MutableGenericMap:
lsst.afw.typehandling._GenericMap.GenericMap lsst.afw.typehandling._SimpleGenericMap.SimpleGenericMap

Public Member Functions

def pop (self, key, default=None)
 

Static Public Attributes

 setdefault = MutableMapping.setdefault
 
 update = MutableMapping.update
 

Detailed Description

An abstract `~collections.abc.MutableMapping` for use when sharing a
map between C++ and Python.

For compatibility with C++, ``MutableGenericMap`` 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++.

Notes
-----
Key-type specializations of ``MutableGenericMap`` are available as, e.g.,
``MutableGenericMap[str]``.

Definition at line 77 of file _GenericMap.py.

Member Function Documentation

◆ pop()

def lsst.afw.typehandling._GenericMap.MutableGenericMap.pop (   self,
  key,
  default = None 
)

Definition at line 106 of file _GenericMap.py.

Member Data Documentation

◆ setdefault

lsst.afw.typehandling._GenericMap.MutableGenericMap.setdefault = MutableMapping.setdefault
static

Definition at line 102 of file _GenericMap.py.

◆ update

lsst.afw.typehandling._GenericMap.MutableGenericMap.update = MutableMapping.update
static

Definition at line 103 of file _GenericMap.py.


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