Raymond Hettinger added the comment: ISTM, the whole point is to compile in advance. When I worked during high frequency trading, that was essential to news trading where you *really* didn't want to pay the compilation cost at the time the regex was used. This proposal takes away the user's only control over when the regex is compiled.
FWIW, if a user doesn't explicitly invoke re.compile() and instead uses a straight call to re.search(pattern, s), then the pattern is compiled on first-use and cached for future use. In other words, we already have a simple and clear way to auto-compile on first use. I recommend against taking away the only option to specify otherwise. ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31580> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com