Collection Interface ABCs
collections.abc.Mapping
Key-value interface with __getitem__, __iter__ and __len__. Direct subclasses receive read-only mapping mixins; implementations may still be mutable.
Formal Syntax & Structure
python syntaxpython
collections.abc.MappingReturn Value
type
Abstract base class object representing the described interface; use it for recognition or inheritance.
Working Example
Example Snippetpython
import collections.abcprint(isinstance({"x":1},collections.abc.Mapping))