Author Noitul
Recipients Noitul, eric.smith, 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:03Noitulsetrecipients: + Noitul, eric.smith, yselivanov, nitishch
2019-04-23 09:45:03Noitulsetmessageid: <1556012703.89.0.474292399721.issue36697@roundup.psfhosted.org>
2019-04-23 09:45:03Noitullinkissue36697 messages
2019-04-23 09:45:03Noitulcreate