MCPcopy Index your code
hub / github.com/RustPython/RustPython / stripid

Function stripid

Lib/pydoc.py:279–282  ·  view source on GitHub ↗

Remove the hexadecimal id from a Python object representation.

(text)

Source from the content-addressed store, hash-verified

277
278_re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
279def stripid(text):
280 """Remove the hexadecimal id from a Python object representation."""
281 # The behaviour of %p is implementation-dependent in terms of case.
282 return _re_stripid.sub(r'\1', text)
283
284def _is_bound_method(fn):
285 """

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