Stefan Krah <ste...@bytereef.org> added the comment: Okay, I have never used something like that. Personally, I'd disallow the global statement in g() if 'a' is local in f().
>>> a = 10 >>> def f(): ... a = 20 ... def g(): ... global a ... print(a) ... g() ... >>> >>> f() 10 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32361> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com