On Mon, 12 Jul 2010 16:18:38 +0100 Michael Foord <fuzzy...@voidspace.org.uk> wrote: > On 12/07/2010 15:07, Nick Coghlan wrote: > > On Mon, Jul 12, 2010 at 9:42 AM, Steven D'Aprano<st...@pearwood.info> > > wrote: > > > >> On Sun, 11 Jul 2010 09:37:22 pm Eric Smith wrote: > >> > >>>> re2 comparison is interesting from the point of if it should be > >>>> included in stdlib. > >>>> > >>> Is "it" re2 or regex? I don't see having 2 regular expression engines > >>> in the stdlib. > >>> > >> There's precedence though... the old regex engine and the new re engine > >> were side-by-side for many years before regex was deprecated and > >> finally removed in 2.5. Hypothetically, re2 could similarly be added to > >> the standard library while re is deprecated. > >> > > re2 deliberately omits some features for efficiency reasons, hence is > > not even on the table as a possible replacement for the standard > > library version. If someone is in a position where re2 can solve their > > problems with the re module, they should also be in a position where > > they can track it down for themselves. > > > > > > If it has *partial* compatibility, and big enough performance > improvements for common cases, it could perhaps be used where the regex > doesn't use unsupported features. This would have some extra cost in the > compile phase, but would mean Python could ship with two regex engines > but only one interface exposed to the programmer...
You're forgetting the maintenance cost. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com