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

Method _pprint_tuple

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

Source from the content-addressed store, hash-verified

369 _dispatch[list.__repr__] = _pprint_list
370
371 def _pprint_tuple(self, object, stream, indent, allowance, context, level):
372 stream.write(self._format_block_start('(', indent))
373 if len(object) == 1 and not self._expand:
374 endchar = ',)'
375 else:
376 endchar = ')'
377 self._format_items(object, stream, indent, allowance + len(endchar),
378 context, level)
379 stream.write(self._format_block_end(endchar, indent))
380
381 _dispatch[tuple.__repr__] = _pprint_tuple
382

Callers

nothing calls this directly

Calls 4

_format_block_startMethod · 0.95
_format_itemsMethod · 0.95
_format_block_endMethod · 0.95
writeMethod · 0.45

Tested by

no test coverage detected