Runtime Types

types.MappingProxyType — runtime type

A read-only interface to an existing mapping, not a snapshot or deep freeze. Changes through the original mapping remain visible; contained mutable values can still change. MappingProxyType(mapping) creates a proxy. copy() delegates to the underlying mapping to make a shallow copy.

Formal Syntax & Structure

python syntaxpython
types.MappingProxyType

Return Value

type

The class object types.MappingProxyType; this reference documents the class identity, not a universal constructor signature.

Working Example

Example Snippetpython
import typesdata={"a":1}value = types.MappingProxyType(data)print(isinstance(value, types.MappingProxyType))
Python Reference