Message20494
Logged In: YES
user_id=6946
This patch seems to fix variable case problems
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.90
diff -c -r1.90 pydoc.py
*** pydoc.py 29 Jan 2004 06:37:49 -0000 1.90
--- pydoc.py 5 Jun 2004 15:26:31 -0000
***************
*** 113,124 ****
return text[:pre] + '...' + text[len(text)-post:]
return text
def stripid(text):
"""Remove the hexadecimal id from a Python object
representation."""
# The behaviour of %p is implementation-dependent; we
check two cases.
! for pattern in [' at 0x[0-9a-f]{6,}(>+)$', ' at
[0-9A-F]{8,}(>+)$']:
! if re.search(pattern, repr(Exception)):
! return re.sub(pattern, '\\1', text)
return text
def _is_some_method(object):
--- 113,124 ----
return text[:pre] + '...' + text[len(text)-post:]
return text
+ _re_stripid =re.compile(' at
(?:0[xX][0-9a-fA-F]{6,}|[0-9a-fA-F]{8,})(>+)$']
def stripid(text):
"""Remove the hexadecimal id from a Python object
representation."""
# The behaviour of %p is implementation-dependent; we
check two cases.
! if _re_stripid.search(repr(Exception)):
! return _re_stripid.sub('\\1', text)
return text
def _is_some_method(object): |
|
Date |
User |
Action |
Args |
2007-08-23 14:20:55 | admin | link | issue934282 messages |
2007-08-23 14:20:55 | admin | create | |
|