MCPcopy Index your code
hub / github.com/RustPython/RustPython / _pprint_ordered_dict

Method _pprint_ordered_dict

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

Source from the content-addressed store, hash-verified

236 _dispatch[dict.__repr__] = _pprint_dict
237
238 def _pprint_ordered_dict(self, object, stream, indent, allowance, context, level):
239 if not len(object):
240 stream.write(repr(object))
241 return
242 cls = object.__class__
243 stream.write(cls.__name__ + '(')
244 self._format(list(object.items()), stream,
245 indent + len(cls.__name__) + 1, allowance + 1,
246 context, level)
247 stream.write(')')
248
249 _dispatch[_collections.OrderedDict.__repr__] = _pprint_ordered_dict
250

Callers

nothing calls this directly

Calls 6

_formatMethod · 0.95
lenFunction · 0.85
reprFunction · 0.85
listClass · 0.85
writeMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected