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

Method _pprint_ordered_dict

Lib/pprint.py:300–314  ·  view source on GitHub ↗
(self, object, stream, indent, allowance, context, level)

Source from the content-addressed store, hash-verified

298 _dispatch[frozendict.__repr__] = _pprint_frozendict
299
300 def _pprint_ordered_dict(self, object, stream, indent, allowance, context, level):
301 if not len(object):
302 stream.write(repr(object))
303 return
304 cls = object.__class__
305 stream.write(cls.__name__ + '(')
306 self._format(
307 list(object.items()),
308 stream,
309 self._child_indent(indent, len(cls.__name__) + 1),
310 allowance + 1,
311 context,
312 level,
313 )
314 stream.write(')')
315
316 _dispatch[_collections.OrderedDict.__repr__] = _pprint_ordered_dict
317

Callers

nothing calls this directly

Calls 5

_formatMethod · 0.95
_child_indentMethod · 0.95
listClass · 0.85
writeMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected