A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046171.html below:

[Python-Dev] Proper tail recursion

[Python-Dev] Proper tail recursion [Python-Dev] Proper tail recursionGuido van Rossum guido at python.org
Thu Jul 15 03:36:16 CEST 2004
> JanC recommended I post this on python-dev to get feedback.  To sum up the 
> previous posts in my thread on comp.lang.python, I've created a patch that 
> optimizes tail calls in the CPython interpreter, so that the stack is not 
> used for functions called in a tail context.

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.

Another reason is that I don't think it's a good idea to try to
encourage a Scheme-ish "solve everything with recursion" programming
style in Python.

But feel free to maintain this as an independent modification, a la
Stackless -- I'm sure there are people who would like to try this
out.

--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

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