MCPcopy Index your code
hub / github.com/ipython/ipython / inner

Function inner

IPython/lib/pretty.py:641–654  ·  view source on GitHub ↗
(obj, p, cycle)

Source from the content-addressed store, hash-verified

639 the default pprint for tuples and lists.
640 """
641 def inner(obj, p, cycle):
642 if cycle:
643 return p.text(start + '...' + end)
644 step = len(start)
645 p.begin_group(step, start)
646 for idx, x in p._enumerate(obj):
647 if idx:
648 p.text(',')
649 p.breakable()
650 p.pretty(x)
651 if len(obj) == 1 and isinstance(obj, tuple):
652 # Special case for 1-item tuples.
653 p.text(',')
654 p.end_group(step, end)
655 return inner
656
657

Callers

nothing calls this directly

Calls 8

_sorted_for_pprintFunction · 0.85
begin_groupMethod · 0.80
_enumerateMethod · 0.80
breakableMethod · 0.80
prettyMethod · 0.80
end_groupMethod · 0.80
keysMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…