Collection Interface ABCs

collections.abc.ItemsView

Mapping view of key-value pairs, with membership and set-like operations where items are hashable. Dictionary item views are live.

Formal Syntax & Structure

python syntaxpython
collections.abc.ItemsView

Return 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}.items(),collections.abc.ItemsView))
Python Reference