[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
report at bugs.python.org
Sun Aug 28 08:12:30 CEST 2011
Steven D'Aprano <steve+python at pearwood.info> added the comment:
I'm not sure if this belongs here, or on the Google code project page, so I'll add it in both places :)
Feature request: please change the NEW flag to something else. In five or six years (give or take), the re module will be long forgotten, compatibility with it will not be needed, so-called "new" features will no longer be new, and the NEW flag will just be silly.
If you care about future compatibility, some sort of version specification would be better, e.g. "VERSION=0" (current re module), "VERSION=1" (this regex module), "VERSION=2" (next generation). You could then default to VERSION=0 for the first few releases, and potentially change to VERSION=1 some time in the future.
Otherwise, I suggest swapping the sense of the flag: instead of "re behaviour unless NEW flag is given", I'd say "re behaviour only if OLD flag is given". (Old semantics will, of course, remain old even when the new semantics are no longer new.)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list