Message99356
This is the stripid implementation:
_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
The problem is that repr(Exception) used to return <class exceptions.Exception at 0x00A64510> on Py<=2.4 but now returns <type 'exceptions.Exception'>, so the code inside the if is never executed (this is what happens where there are no unittests).
That 'if' has been introduced in r19750 and I think that the reason is to check if the id in 'text' is really an id and hence has the same format of the ids of other objects. I don't think this is really necessary though. |
|
Date |
User |
Action |
Args |
2010-02-15 09:43:22 | ezio.melotti | set | recipients:
+ ezio.melotti, mnewman |
2010-02-15 09:43:22 | ezio.melotti | set | messageid: <1266227002.52.0.897226273765.issue7930@psf.upfronthosting.co.za> |
2010-02-15 09:42:21 | ezio.melotti | link | issue7930 messages |
2010-02-15 09:42:20 | ezio.melotti | create | |
|