Remove the hexadecimal id from a Python object representation.
(text)
| 212 | |
| 213 | _re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE) |
| 214 | def 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 | |
| 219 | def _is_bound_method(fn): |
| 220 | """ |
searching dependent graphs…