Message328509
Bug with regex substitutions. When calling the re.sub() method directly
char(92), the double backslash charecter as the replacement, throws an
exception. Whereas compiling a regex object then calling its own .sub()
method works completely fine. I did a quick look through the bug tracker
search for similar issues and none were reported.
# Breaks
re.sub(r'\\\\', chr(92), stringy_thingy)
vs
# Works
parser = re.compile(r'\\\\')
parser.sub(chr(92), stringy_thingy)
# Where stringy_thingy is a string that is being substituted |
|
Date |
User |
Action |
Args |
2018-10-26 04:36:16 | Samuel Warfield | set | recipients:
+ Samuel Warfield, ezio.melotti, mrabarnett |
2018-10-26 04:36:16 | Samuel Warfield | set | messageid: <1540528576.04.0.788709270274.issue35072@psf.upfronthosting.co.za> |
2018-10-26 04:36:15 | Samuel Warfield | link | issue35072 messages |
2018-10-26 04:36:15 | Samuel Warfield | create | |
|