[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Vlastimil Brom
report at bugs.python.org
Tue Nov 2 12:56:07 CET 2010
Vlastimil Brom <vlastimil.brom at gmail.com> added the comment:
There seems to be a bug in the handling of numbered backreferences in sub() in
issue2636-20101102.zip
I believe, it would be a fairly new regression, as it would be noticed rather soon.
(tested on Python 2.7; winXP)
>>> re.sub("([xy])", "-\\1-", "abxc")
'ab-x-c'
>>> regex.sub("([xy])", "-\\1-", "abxc")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\regex.py", line 176, in sub
return _compile(pattern, flags).sub(repl, string, count, pos, endpos)
File "C:\Python27\lib\regex.py", line 375, in _compile_replacement
compiled.extend(items)
TypeError: 'int' object is not iterable
>>>
vbr
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________
More information about the Python-bugs-list
mailing list