Nick Coghlan wrote:
On Fri, Jul 9, 2010 at 5:52 AM, MRAB <python@mrabarnett.plus.com> wrote:
Hi all,
I re-implemented the re module, adding new features and speed improvements. It's available at:
http://pypi.python.org/pypi/regex
under the name "regex" so that it can be tried alongside "re".
I'd be interested in any comments or feedback. How does it compare with "re" in terms of speed on real-world data? The benchmarks suggest it should be faster, or at worst comparable.
How much interest would there be in putting it in Python 3.2?
The list of fixed bugs/new features is certainly impressive. How does Python's test suite go if you drop it in place of the current "re" module? (Ditto for test suites of major applications and frameworks like Django, etc).
Off the top of my head, I would say that this won't have enough time to bake properly for inclusion in 3.2, but if the potential benefits and intended backwards compatibility are borne out by real world usage and the code fares well under review then it may be a contender for 3.3. If the backwards compatibility isn't quite there (and can't be improved), then adding it under a name other than "re" wouldn't be impossible, but it would be a harder sell.
You should be able to replace: import re with: import regex as re and still have everything work the same, ie it's backwards compatible with re.