bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)

They were undocumented and never working.
This commit is contained in:
Serhiy Storchaka 2022-04-06 19:53:50 +03:00 committed by GitHub
parent da922409ac
commit b09184bf05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 18 deletions

View file

@ -147,8 +147,6 @@ def _compile(data, pattern, flags):
else:
emit(ANY)
elif op in REPEATING_CODES:
if flags & SRE_FLAG_TEMPLATE:
raise error("internal: unsupported template operator %r" % (op,))
if _simple(av[2]):
emit(REPEATING_CODES[op][2])
skip = _len(code); emit(0)