Remove the hexadecimal id from a Python object representation.
(text)
| 277 | |
| 278 | _re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE) |
| 279 | def 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 | |
| 284 | def _is_bound_method(fn): |
| 285 | """ |