function with a state

Xah Lee xah at xahlee.org
Tue Mar 8 20:30:17 EST 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