mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-91524: Speed up the regular expression substitution (#91525)
Functions re.sub() and re.subn() and corresponding re.Pattern methods are now 2-3 times faster for replacement strings containing group references. Closes #91524 Primarily authored by serhiy-storchaka Serhiy Storchaka Minor-cleanups-by: Gregory P. Smith [Google] <greg@krypto.org>
This commit is contained in:
parent
176b6c57be
commit
75a6fadf36
9 changed files with 358 additions and 91 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
# update when constants are added or removed
|
||||
|
||||
MAGIC = 20220615
|
||||
MAGIC = 20221023
|
||||
|
||||
from _sre import MAXREPEAT, MAXGROUPS
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue