mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
gh-92728: Restore re.template, but deprecate it (GH-93161)
Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)" This reverts commitb09184bf05
. (cherry picked from commit16a7e4a0b7
) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
This commit is contained in:
parent
7a5f190c9f
commit
74b205b3eb
10 changed files with 65 additions and 5 deletions
|
@ -61,11 +61,12 @@ FLAGS = {
|
|||
"x": SRE_FLAG_VERBOSE,
|
||||
# extensions
|
||||
"a": SRE_FLAG_ASCII,
|
||||
"t": SRE_FLAG_TEMPLATE,
|
||||
"u": SRE_FLAG_UNICODE,
|
||||
}
|
||||
|
||||
TYPE_FLAGS = SRE_FLAG_ASCII | SRE_FLAG_LOCALE | SRE_FLAG_UNICODE
|
||||
GLOBAL_FLAGS = SRE_FLAG_DEBUG
|
||||
GLOBAL_FLAGS = SRE_FLAG_DEBUG | SRE_FLAG_TEMPLATE
|
||||
|
||||
class State:
|
||||
# keeps track of state for parsing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue