Christopher King writes: > To tell the truth, I don't really have any immediate use for this > functionality, either, but since it turned out to be so > easy to implement, > I ask, "why not?" ;) Martin replies: > The traditional answer to that question is "because Jython cannot > support it". No... that answer applies to *language features*, but not *implementation details*. The recursion limit (the value of it anyhow) is an implementation detail. Think of it this way: if Iron Python, Jython, or PyPy were to implement a clever trick that made loops run 10x faster, that would be swell, even if the same trick couldn't be done in CPython. If CPython can find a way to run recursion far more efficiently, then that's swell too. Of course, the actual results from running the program must not differ, but that doesn't seem too difficult to achieve. Guido writes: > I'm not interested in adding this to the official Python release. > > One reason is that if an exception happens in such a tail-recursive > call, the stack trace will be confusing. This doesn't bother me as much as it apparently bothers you. But for that matter, we hardly care about performance if we're going to be generating a stack trace, so we could probably construct the stack trace after-the-fact if needed. Guido continues:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4