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

Method _pprint_bytearray

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

Source from the content-addressed store, hash-verified

483 _dispatch[bytes.__repr__] = _pprint_bytes
484
485 def _pprint_bytearray(self, object, stream, indent, allowance, context, level):
486 write = stream.write
487 write(self._format_block_start('bytearray(', indent))
488 if self._expand:
489 write(' ' * self._indent_per_level)
490 recursive_indent = indent + self._indent_per_level
491 else:
492 recursive_indent = indent + 10
493 self._pprint_bytes(bytes(object), stream, recursive_indent,
494 allowance + 1, context, level + 1)
495 write(self._format_block_end(')', indent))
496
497 _dispatch[bytearray.__repr__] = _pprint_bytearray
498

Callers

nothing calls this directly

Calls 4

_format_block_startMethod · 0.95
_pprint_bytesMethod · 0.95
_format_block_endMethod · 0.95
writeFunction · 0.70

Tested by

no test coverage detected