[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

Georg Brandl report at bugs.python.org
Sun Sep 12 23:16:19 CEST 2010


Georg Brandl <georg at python.org> added the comment:

Matthew, I understand why you want to have these flags scoped, and if you designed a regex dialect from scratch, that would be the way to go.  However, if we want to integrate this in Python 3.2 or 3.3, this is an absolute killer if it's not backwards compatible.

I can live with behavior changes that really are bug fixes, and of course with new features that were invalid syntax before, but this is changing an aspect that was designed that way (as the test case shows), and that really is not going to happen without an explicit new flag. Special-casing the "flags at the end" case is too magical to be of any help.

It will be hard enough to get your code into Python -- it is a huge new codebase for an absolutely essential module.  I'm nevertheless optimistic that it is going to happen at some point or other.  Of course, you would have to commit to maintaining it within Python for the forseeable future.

The "script" and "block" functions really belong into unicodedata; you'll have to coordinate that with Marc-Andre.

@Vlastimil: backwards compatibility is needed very much here.  Nobody wants to review all their regexes when switching from Python 3.1 to Python 3.2.  Many people will not care about the improved engine, they just expect their regexes to work as before, and that is a perfectly fine attitude.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________


More information about the Python-bugs-list mailing list