function with a state

Xah Lee xah at xahlee.org
Wed Mar 9 02:30:17 CET 2005


>def myFun(var):
>   return var+1
>globe = 0
>globe = myFun(globe)

this is  intriguing. How does it work?
not a rhetorical question, but where in the python doc can i read about
it?

thanks.

 Xah
 xah at xahlee.org
 http://xahlee.org/PageTwo_dir/more.html




More information about the Python-list mailing list