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.
nonlocal (within "handler") would make the assignment apply to the
enclosing scope lastModifiedTime, instead.
--
--S
... p.s: change the ".invalid" to ".com" in email address to reply privately.
--
http://mail.python.org/mailman/listinfo/python-list