On Sun, Dec 29, 2013 at 10:33:15PM +1100, Steven D'Aprano wrote:

> def f(x):
>     print("Inside the outer function x =", x)
>     def g(y):  # a function nested inside another function
>         print("Inside the inner function x =", x)
>         print("Inside the inner function y =", y)
>         return x + y
>     return f(23)

Oops, sorry a typo crept into this. That last line ought to be 
"return g(23)". Sorry for any confusion.



-- 
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to