On Fri, 25 Jan 2008 03:28:05 -0800, Tim Rau wrote: >> Because you don't assign to allThings, and therefore it is treated as >> global. >> >> > Hmm.... so I can't assign to globals in a local environment? How do I > make it see that I'm assigning to a global?
I thought somebody had already mentioned this... possibly even me... You can declare a name as global by using the global statement: def foo(): global x x += 1 -- Steven -- http://mail.python.org/mailman/listinfo/python-list