Raymond Hettinger added the comment: > A national variable maybe :)
I would think that "nonlocal" is exactly the right term given that that is how you would declare it if you wanted to write to it. >>> w = 5 >>> def f(x): def g(y): nonlocal x global w z = x + y x += 1 print(locals()) print(globals()) return g >>> f(10)(20) {'y': 20, 'x': 11, 'z': 30} {'w': 5, ...} ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com