[ python-Bugs-934282 ] pydoc.stripid doesn't strip ID
SourceForge.net
noreply at sourceforge.net
Sat Jun 5 11:36:04 EDT 2004
Bugs item #934282, was opened at 2004-04-13 15:32
Message generated for change (Comment added) made by rgbecker
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=934282&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: pydoc.stripid doesn't strip ID
Initial Comment:
pydoc function stripid should strip the ID from an object's
repr. It assumes that ID will be represented as one of
two patterns -- but this is not the case with (at least)
the 2.3.3 distributed binary, because of case-sensitivity.
' at 0x[0-9a-f]{6,}(>+)$'
fails because the address is capitalized -- A-F. (Note
that hex(15) is not capitalized -- this seems to be unique
to addresses.)
' at [0-9A-F]{8,}(>+)$'
fails because the address does contain a 0x.
stripid checks both as a guard against false alarms, but
I'm not sure how to guarantee that an address would
contain a letter, so matching on either all-upper or
all-lower may be the tightest possible bound.
----------------------------------------------------------------------
Comment By: Robin Becker (rgbecker)
Date: 2004-06-05 15:36
Message:
Logged In: YES
user_id=6946
Definitely a problem in 2.3.3.
using
class bongo: pass
print bongo()
On freebsd with 2.3.3 I get
<__main__.bongo instance at 0x81a05ac>
with win2k I see
<__main__.bongo instance at 0x0112FFD0>
both are 8 characters, but the case differs.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2004-04-14 19:34
Message:
Logged In: YES
user_id=11105
It seems this depends on the operating system, more exactly
on how the C compiler interprets the %p printf format.
According to what I see, on windows it fails, on linux it works.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=934282&group_id=5470
More information about the Python-bugs-list
mailing list