[issue31580] Defer compiling regular expressions

Ezio Melotti report at bugs.python.org
Tue Sep 26 15:52:17 EDT 2017


Ezio Melotti added the comment:

What about adding a lazy_compile() function?  It will leave the current behavior unchanged, it's explicit, and it's easier to use cross version (if importing re.lazy_compile fails, use re.compile).

FWIW I'm -1 on changing re.compile, -1 on adding re.IMMEDIATE, -0.5 on adding re.DEFERRED (not sure this option belongs among the re flag), +1 on adding a compile-time optimization.

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31580>
_______________________________________


More information about the Python-bugs-list mailing list