[Python-Dev] global variable modification in functions [Re: elimination of scope bleeding of iteration variables]
Oleg Broytmann
phd at mail2.phd.pp.ru
Mon May 1 14:32:35 CEST 2006
On Sun, Apr 30, 2006 at 10:47:07PM -0500, Ben Wing wrote:
> foo = 1
>
> def set_foo():
> foo = 2
PyLint gives a warning here "local foo shadows global variable".
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev
mailing list