[Python-Dev] SRE recursion removed
Martin v. Löwis
martin at v.loewis.de
Sat Oct 18 15:01:52 EDT 2003
Gustavo Niemeyer <niemeyer at conectiva.com> writes:
> 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.
Hmm. Either you trust that your code is basically correct or you
don't. If you trust that it is basically correct, you should remove
the old code, and trust that any problems in SRE (be they related to
your code or independent) can be fixed, in which case maintaining the
old code would be pointless.
Or, if you don't trust that your code is basically correct, you should
not have applied the patch.
> The "dead" code you're talking about is probably the unused macros,
No, I'm talking about the now-disabled recursive code.
I also wonder whether the code performing recursion checks has any
function still. So I wonder whether USE_STACKCHECK,
USE_RECURSION_LIMIT are "essentially" dead.
> But if they're really a problem, well, I'll remove. Just let me
IMO, any unused code in SRE is a problem, because it makes already
difficult-to-follow code more difficult to follow. It is ok to
maintain dead code if the code might be used in the future, but only
if there are specific plans to actually use it in a foreseeable
future. It is not ok
More information about the Python-Dev