]> granicus.if.org Git - python/commit
Issue #25953: re.sub() now raises an error for invalid numerical group
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 23 Oct 2016 09:11:19 +0000 (12:11 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 23 Oct 2016 09:11:19 +0000 (12:11 +0300)
commit662cef66d7e90ec3c391a5b5ab933c159ef009b6
tree11da5a500cbd51d091cc5ffb25b5d892ce3c4053
parent265dce6cbbe700183228632f16bc1d4a2683c935
Issue #25953: re.sub() now raises an error for invalid numerical group
reference in replacement template even if the pattern is not found in
the string.  Error message for invalid group reference now includes the
group index and the position of the reference.
Based on patch by SilentGhost.
Lib/sre_parse.py
Lib/test/test_re.py
Misc/NEWS