* Stephen Hansen:
On 2010-04-04 15:22:48 -0700, Alf P. Steinbach said:
* johngilbrough:
I cannot make sense of what's happening here ... I'm getting the
following error:
(1)
At least in Py3 you can declare the variable as 'global', like this:
global lastModifiedTime
within the function.
Actually, what you're looking for in py3 is the "nonlocal" keyword,
which addresses this precise situation. Using "global" would mark the
variable as *global* -- top-level module namespace.
Thanks, I didn't see that. I thought it was a global.
nonlocal (within "handler") would make the assignment apply to the
enclosing scope lastModifiedTime, instead.
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list