Noitul <qaza...@gmail.com> added the comment:
Sorry for the misleading snippet above. And how about this one: >>> import inspect >>> a = 0 >>> b = 1 >>> c = 2 >>> def abc(): >>> return a.b >>> print(inspect.getclosurevars(abc)) ClosureVars(nonlocals={}, globals={'a': 0, 'b': 1}, builtins={}, unbound=set()) If this is not a bug, the "globals" is the "function's module globals", but why 'c' not in the "globals"? ---------- status: pending -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36697> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com