[issue2636] Adding a new regex module (compatible with re)
report at bugs.python.org
Fri Sep 2 03:30:32 CEST 2011
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
In order to replace the re module, regex must have the same behavior (except for bugs, where the correct behavior is most likely preferred, even if it's different).
Having re.OLD and warnings active by default in 3.3 (and possibly 3.4) should give enough time to fix the regex if/when necessary (either by changing the regex or by adding the re.OLD flag manually). In 3.4 (or 3.5) we can then change the default behavior to the new semantics.
In this way we won't have to keep using the re.NEW flag on every regex. I'm not sure if a version flag is useful, unless you are planning to add more incompatible changes. Also each new version *flag* means one more path to add/maintain in the code. Having a simple .regex_version attribute might be a more practical (albeit less powerful) solution.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list