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

Function _display_labels

Doc/tools/extensions/pydoc_topics.py:191–196  ·  view source on GitHub ↗
(item: tuple[str, Sequence[tuple[str, str]]])

Source from the content-addressed store, hash-verified

189
190
191def _display_labels(item: tuple[str, Sequence[tuple[str, str]]]) -> str:
192 _docname, label_ids = item
193 labels = [name for name, _id in label_ids]
194 if len(labels) > 4:
195 return f"{labels[0]}, {labels[1]}, ..., {labels[-2]}, {labels[-1]}"
196 return ", ".join(labels)
197
198
199def _repr(text: str, /) -> str:

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…