In article <4c70344a$0$1659$742ec...@news.sonic.net>,
John Nagle  <na...@animats.com> wrote:
>
>    Realistically, recursion isn't that important in Python.  It's
>there if you need it, and sometimes useful, but generally not used
>much without good reason.  In some functional languages, recursion
>is routinely used in place of iteration, but Python isn't built for
>that.  In Python, most of the use cases for trivial recursion
>are better handled with iteration or generators.

Depends how you define "important".  It's certainly a critical feature
for Python that you *can* use recursion; it's usually the simplest way of
walking a tree structure (such as a directory tree).  Python would be an
extraordinarily limited language if recursion were not available.
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"...if I were on life-support, I'd rather have it run by a Gameboy than a
Windows box."  --Cliff Wells
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to