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/046217.html below:

[Python-Dev] Proper tail recursion

[Python-Dev] Proper tail recursion [Python-Dev] Proper tail recursionAndrew Koenig ark-mlist at att.net
Thu Jul 15 18:04:43 CEST 2004
> Just a note: because Python sticks an implicit 'return None' at the end of
> a function, rather than returning the result of the last expression, like
> Scheme, you have to have an explicit return to see any effect:
> 
>  	def traverse(t, f):
>  		if t:
>  			f(t)
>  			traverse(t.left)
>  			return traverse(t.right)

Right.  I actually worked that out for myself not too long ago, and then
forgot it.

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