MCPcopy Index your code
hub / github.com/python/cpython / _pprint_mapping_abc_view

Method _pprint_mapping_abc_view

Lib/pprint.py:340–346  ·  view source on GitHub ↗

Pretty print mapping views from collections.abc.

(self, object, stream, indent, allowance, context, level)

Source from the content-addressed store, hash-verified

338 write(self._format_block_end("])", indent))
339
340 def _pprint_mapping_abc_view(self, object, stream, indent, allowance, context, level):
341 """Pretty print mapping views from collections.abc."""
342 write = stream.write
343 write(object.__class__.__name__ + '(')
344 # Dispatch formatting to the view's _mapping
345 self._format(object._mapping, stream, indent, allowance, context, level)
346 write(')')
347
348 _dict_keys_view = type({}.keys())
349 _dispatch[_dict_keys_view.__repr__] = _pprint_dict_view

Callers

nothing calls this directly

Calls 2

_formatMethod · 0.95
writeFunction · 0.70

Tested by

no test coverage detected