129
129
# public symbols
130
130
__all__ = [
131
131
"match" , "fullmatch" , "search" , "sub" , "subn" , "split" ,
132
- "findall" , "finditer" , "compile" , "purge" , "template" , " escape" ,
132
+ "findall" , "finditer" , "compile" , "purge" , "escape" ,
133
133
"error" , "Pattern" , "Match" , "A" , "I" , "L" , "M" , "S" , "X" , "U" ,
134
134
"ASCII" , "IGNORECASE" , "LOCALE" , "MULTILINE" , "DOTALL" , "VERBOSE" ,
135
135
"UNICODE" , "NOFLAG" , "RegexFlag" ,
@@ -148,8 +148,6 @@ class RegexFlag:
148
148
MULTILINE = M = _compiler .SRE_FLAG_MULTILINE # make anchors look for newline
149
149
DOTALL = S = _compiler .SRE_FLAG_DOTALL # make dot match newline
150
150
VERBOSE = X = _compiler .SRE_FLAG_VERBOSE # ignore whitespace and comments
151
- # sre extensions (experimental, don't rely on these)
152
- TEMPLATE = T = _compiler .SRE_FLAG_TEMPLATE # disable backtracking
153
151
DEBUG = _compiler .SRE_FLAG_DEBUG # dump pattern after compilation
154
152
__str__ = object .__str__
155
153
_numeric_repr_ = hex
@@ -231,10 +229,6 @@ def purge():
231
229
_cache .clear ()
232
230
_compile_repl .cache_clear ()
233
231
234
- def template (pattern , flags = 0 ):
235
- "Compile a template pattern, returning a Pattern object"
236
- return _compile (pattern , flags | T )
237
-
238
232
# SPECIAL_CHARS
239
233
# closing ')', '}' and ']'
240
234
# '-' (a range in character set)
0 commit comments