Ezio Melotti <ezio.melo...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to