Change pydoc.stripid() be able to match against 64-bit addresses by having

regex match from 6 to 16 characters.
This commit is contained in:
Brett Cannon 2004-06-19 01:22:48 +00:00
parent c6c1f478d9
commit 84601f14a3
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ def cram(text, maxlen):
return text[:pre] + '...' + text[len(text)-post:] return text[:pre] + '...' + text[len(text)-post:]
return text return text
_re_stripid = re.compile(r' at 0x[0-9a-f]{6,}(>+)$', re.IGNORECASE) _re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
def stripid(text): def stripid(text):
"""Remove the hexadecimal id from a Python object representation.""" """Remove the hexadecimal id from a Python object representation."""
# The behaviour of %p is implementation-dependent in terms of case. # The behaviour of %p is implementation-dependent in terms of case.