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

Function stripid

Lib/pydoc.py:214–217  ·  view source on GitHub ↗

Remove the hexadecimal id from a Python object representation.

(text)

Source from the content-addressed store, hash-verified

212
213_re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
214def stripid(text):
215 """Remove the hexadecimal id from a Python object representation."""
216 # The behaviour of %p is implementation-dependent in terms of case.
217 return _re_stripid.sub(r'\1', text)
218
219def _is_bound_method(fn):
220 """

Callers 5

repr1Method · 0.85
repr_instanceMethod · 0.85
repr1Method · 0.85
repr_instanceMethod · 0.85
test_stripidMethod · 0.85

Calls 1

subMethod · 0.45

Tested by 1

test_stripidMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…