New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
They were added in 436c3d58a2570f3b599e59b4071f944f774ec441 (between 1.6a2 and 2.0), but the purpose is not known. See also https://mail.python.org/archives/list/python-...@python.org/message/DVSQGM5LO4TK63C63H6KQ6XBTBQGFLEN/. The feature was not fully implemented, and it was disabled short time later in 29c4ba9ada44d62988c62c85c8046985f10a1c85. Currently the only effect of this flag is that repetition operators (+, *, ?, {}) do not work. A comment was added in 3562f1176403653ebfbef6275d449ad42d1b843a: SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking) It's all. I guess it could have some relation to possessive repetition operators, except that it is a global flag. I think it should be removed without deprecation because it never really worked and never was documented. ---------- components: Library (Lib), Regular Expressions messages: 416658 nosy: ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal status: open title: Remove re.template() and re.TEMPLATE type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47211> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com