[Python-Dev] SRE recursion removed
niemeyer at conectiva.com
Sun Oct 19 15:11:44 EDT 2003
> > There's a single case of single recursion, that's why it can't be 1:
> > when SRE_COUNT() is called from the main loop, and then it calls
> > SRE_MATCH() again. OTOH, this second call of SRE_MATCH() will *never*
> > recurse again, unless there's a serious bug in the expression compiler
> > (which is not the case right now).
> I see. So there is a guarantee that level will never be larger than 2?
> > USE_RECURSION_LIMIT is a friend of USE_RECURSION. We have already
> > discussed this in other messages.
> Maybe we have, but it was not clear to me. It even still isn't:
> Wouldn't it be possible to leave USE_RECURSION in, and remove
> USE_RECURSION_LIMIT, and the level argument?
Of course we can. It depends totally on what we want to do. We can
remove it, and then if we enable USE_RECURSION, it may blow up the
stack without being catched.
> I was relying on your credibility, so I was surprised that you are
> interested to leave the old code in - that suggests that you feel
> there are problems with your code. I'm trying to find out what you
> think these problems are.
I don't think there are problems.
> However, getting all trust in the SRE code from the trust that I have
> in you is not enough for me - and, PLEASE UNDERSTAND, this has nothing
> to do with you personally. I feel bad if important code is so
> unmaintainable that only a single person understands it. I made the
> remark as a comment to you saying
> "let's please wait a little bit to see the new code working?"
> which suggested that we actually have to *see* how the code works, in
> order to determine whether it works.
It's the first time in my entire life I'm being blamed for being
More information about the Python-Dev