Review, suggestion etc?

Grant Edwards grant.b.edwards at gmail.com
Thu Dec 17 23:02:18 EST 2020


On 2020-12-18, Joe Pfeiffer <pfeiffer at cs.nmsu.edu> wrote:

> Recursion has very limited application, but where it's the right
> tool it's invaluable (top-down parsers, some graph algorithms...).
> We teach it primarily because by the time a student has a good
> handle on how to write a recursive function they understand
> functions in general really well.

Yep, there are definitly cases where it's pretty much the only right
answer. If you try to avoid it, you end up writing what turns into a
simulation of recursion -- and doing that correctly isn't easy.

--
Grant






More information about the Python-list mailing list