MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / template

Function template

tools/python-3.11.9-amd64/Lib/re/__init__.py:234–244  ·  view source on GitHub ↗

Compile a template pattern, returning a Pattern object, deprecated

(pattern, flags=0)

Source from the content-addressed store, hash-verified

232 _compile_repl.cache_clear()
233
234def template(pattern, flags=0):
235 "Compile a template pattern, returning a Pattern object, deprecated"
236 import warnings
237 warnings.warn("The re.template() function is deprecated "
238 "as it is an undocumented function "
239 "without an obvious purpose. "
240 "Use re.compile() instead.",
241 DeprecationWarning)
242 with warnings.catch_warnings():
243 warnings.simplefilter("ignore", DeprecationWarning) # warn just once
244 return _compile(pattern, flags|T)
245
246# SPECIAL_CHARS
247# closing ')', '}' and ']'

Callers

nothing calls this directly

Calls 2

_compileFunction · 0.70
warnMethod · 0.45

Tested by

no test coverage detected