MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / stripid

Function stripid

tools/python-3.11.9-amd64/Lib/pydoc.py:242–245  ·  view source on GitHub ↗

Remove the hexadecimal id from a Python object representation.

(text)

Source from the content-addressed store, hash-verified

240
241_re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
242def stripid(text):
243 """Remove the hexadecimal id from a Python object representation."""
244 # The behaviour of %p is implementation-dependent in terms of case.
245 return _re_stripid.sub(r'\1', text)
246
247def _is_bound_method(fn):
248 """

Callers 4

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

Calls 1

subMethod · 0.45

Tested by

no test coverage detected