next up previous contents index
Next: Local Call Up: Tail Recursion Previous: Tail Recursion   Contents   Index

Tail Recursion Exceptions

Although Python is claimed to be ``properly'' tail-recursive, some might dispute this, since there are situations where tail recursion is inhibited:

These dynamic extent binding forms inhibit tail recursion because they allocate stack space to represent the binding. Shallow-binding implementations of dynamic scoping also require cleanup code to be evaluated when the scope is exited.



Peter Van Eynde 2001-03-08