SimpleGenericMap¶
- class lsst.afw.typehandling.SimpleGenericMap(*args, **kwargs)¶
- Bases: - MutableGenericMap- A - dict-like- MutableMappingfor 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 have- Storableas 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 by- shared_ptrin C++.- Parameters:
- mappingcollections.abc.Mapping, optional
- iterableiterable, optional
- dtypetype, optional
- The type of key the map accepts. Not required if - mappingor- iterableis provided.
- **kwargs
- Aside from the - dtypekeyword, a- SimpleGenericMaptakes the same input arguments as- dict.
 
- mapping
 - Attributes Summary - Methods Summary - fromkeys(iterable[, value])- items()- keys()- pop(key[, default])- setdefault(k[,d])- update([E, ]**F)- If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v - values()- Attributes Documentation - TEMPLATE_DEFAULTS = (None,)¶
 - TEMPLATE_PARAMS = ('dtype',)¶
 - Methods Documentation - classmethod fromkeys(iterable, value=None)¶
 - items() a set-like object providing a view on D's items¶
 - keys() a set-like object providing a view on D's keys¶
 - pop(key, default=None)¶
 - setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D¶
 - update([E, ]**F) None. Update D from mapping/iterable E and F.¶
- If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v 
 - values() an object providing a view on D's values¶