[Python-Dev] SRE recursion removed

Guido van Rossum guido at python.org
Sat Oct 18 15:58:57 EDT 2003


> > > If you enable USE_RECURSION it will become recursive again, so it's
> > > nice to see if some problem is related to the non-recursive algorithm
> > > or not, and makes it easy to understand to change made.
> > 
> > That's okay.
> 
> There is no interface to enable USE_RECURSION except for editing
> _sre.c, and I cannot see why anybody would do that (except to see
> whether a bug goes away if it is enabled). So isn't then the old code
> essentially dead as well?

Given that we're talking about a very complicated change to extremely
delicate code, and we're pre-alpha, and we've explicitly discussed
giving the code the benefit of the doubt because nobody has the guts
to review it, I find it perfectly reasonable to leave the old code in
with a quick way to re-enable it in case someone produces a test case
that they claim breaks with the new code.  The old code can be phased
out once we're certain the new code is rock solid.  I don't mind
having the #ifdef in for one release cycle.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list