]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 Feb 2019 13:48:23 +0000 (05:48 -0800)
committerGitHub <noreply@github.com>
Mon, 18 Feb 2019 13:48:23 +0000 (05:48 -0800)
commit0e379d43acc25277f02262212932d3c589a2031b
tree2c2d4461326f63766cd3c1bd1b5c79dce19b1100
parenta01065a3588d3f0d0c57ea35107aa97e722fe2b2
bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)

Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases.

Also add a missing index in re.rst.
(cherry picked from commit 4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0)

Co-authored-by: animalize <animalize@users.noreply.github.com>
Doc/library/re.rst
Lib/test/test_re.py
Misc/NEWS.d/next/Library/2019-01-14-11-53-10.bpo-34294.3JFdg2.rst [new file with mode: 0644]
Modules/_sre.c
Modules/sre_lib.h