This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author llehtahw
Recipients eric.smith, llehtahw, nitishch, yselivanov
Date 2019-04-23.09:45:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556012703.89.0.474292399721.issue36697@roundup.psfhosted.org>
In-reply-to
Content
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"?
History
Date User Action Args
2019-04-23 09:45:03llehtahwsetrecipients: + llehtahw, eric.smith, yselivanov, nitishch
2019-04-23 09:45:03llehtahwsetmessageid: <1556012703.89.0.474292399721.issue36697@roundup.psfhosted.org>
2019-04-23 09:45:03llehtahwlinkissue36697 messages
2019-04-23 09:45:03llehtahwcreate