[Python-Dev] SRE recursion removed

Martin v. Löwis martin at v.loewis.de
Sun Oct 19 13:36:04 EDT 2003


Gustavo Niemeyer <niemeyer at conectiva.com> writes:

> You may have lost it. I haven't.

Very good.

> 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?

> > Certainly. However, I was hoping that we have better means of finding
> > out whether the code still does what it is supposed to do than
> > testing. Perhaps that is an illusion.
> 
> I'm shocked. Do you really belive that I've done all the changes and
> past fixes in SRE without knowing how it works? I thought my
> credibility was a little higher.

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.

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.

Regards,
Martin




More information about the Python-Dev mailing list