FOR statement
Theerasak Photha
hanumizzle at gmail.com
Sat Oct 21 05:10:56 EDT 2006
On 10/21/06, Diez B. Roggisch <deets at nospam.web.de> wrote:
> Theerasak Photha schrieb:
> > On 21 Oct 2006 00:50:34 -0700, Ant <antroy at gmail.com> wrote:
> >
> >> But there's a good reason not to. Try:
> >>
> >> printreverse(range(1000))
> >>
> >> Recursion has a maximum depth (of 1000 by default) in Python.
> >
> > I guess Python isn't tail-recursive then?
>
> To complement my other post: while it isn't tail recursive and can't be
> so automatically, there do exist recipes to make certain functions tail
> recursive by hand:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474088
Wow. That's 1337.
-- Theerasak
More information about the Python-list
mailing list