summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-02-16 23:26:09 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-02-16 23:26:09 (GMT)
commite511fc7979b21a62edf3f85d4eecdc8a9ea2f06a (patch)
treeee6e6b05b94cf33bd94f7c05ecc881c9d017db2b /Lib/pydoc.py
parent6dfe66298b8a89d04ca94ee5f878a86b59cbc4d9 (diff)
downloadcpython-e511fc7979b21a62edf3f85d4eecdc8a9ea2f06a.zip
cpython-e511fc7979b21a62edf3f85d4eecdc8a9ea2f06a.tar.gz
cpython-e511fc7979b21a62edf3f85d4eecdc8a9ea2f06a.tar.bz2
#7930: fix stripid
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 7da75b6..7a55023 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -124,9 +124,7 @@ _re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
def stripid(text):
"""Remove the hexadecimal id from a Python object representation."""
# The behaviour of %p is implementation-dependent in terms of case.
- if _re_stripid.search(repr(Exception)):
- return _re_stripid.sub(r'\1', text)
- return text
+ return _re_stripid.sub(r'\1', text)
def _is_some_method(obj):
return inspect.ismethod(obj) or inspect.ismethoddescriptor(obj)