Julien Palard added the comment: Hi, thanks for reporting,
Variables are defined in python docs¹ by: > If a name is bound in a block, it is a local variable of that block, unless > declared as nonlocal or global. If a name is bound at the module level, it is > a global variable. (The variables of the module code block are local and > global.) If a variable is used in a code block but not defined there, it is a > free variable. According to this definition, global variables used in a code block are free variable, is this intentional? I think so, but can't be sure, maybe someone is seeing this as "globals are NOT free variables", in this case, this definition should probably be enhanced. If I'm right, maybe we should just change "Free variables are returned"… to "Non-global free variables are returned"…? ---------- nosy: +mdk _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28853> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com