summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-02-16 23:31:04 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-02-16 23:31:04 (GMT)
commit412c95a4858e3020779baf0906b8c90eaa21108c (patch)
tree8291b00377c06ebd966e6fa10ba41884a46d3cd3 /Lib/pydoc.py
parent19ed3c8bf5570d0709f7c8399d87d130de8d954e (diff)
downloadcpython-412c95a4858e3020779baf0906b8c90eaa21108c.zip
cpython-412c95a4858e3020779baf0906b8c90eaa21108c.tar.gz
cpython-412c95a4858e3020779baf0906b8c90eaa21108c.tar.bz2
Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line #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 28d3bb8..79fb54a 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -123,9 +123,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)