Learning Python wrote:
> A example in learning Python by Mark Lutz and David Ascher
>
> about function scope
>
> example like this:
>
> >>def outer(x):
>      def inner(i):
>         print i,
>         if i: inner(i-1)
>      inner(x)
> >>outer(3)
>
> Here supposely, it should report error, because the function inner
> cannot see itself since inner is only in local namespace of outer.

If that were so, Pythonistas could never write a recursive function!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to