Message340708
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"? |
|
Date |
User |
Action |
Args |
2019-04-23 09:45:03 | llehtahw | set | recipients:
+ llehtahw, eric.smith, yselivanov, nitishch |
2019-04-23 09:45:03 | llehtahw | set | messageid: <1556012703.89.0.474292399721.issue36697@roundup.psfhosted.org> |
2019-04-23 09:45:03 | llehtahw | link | issue36697 messages |
2019-04-23 09:45:03 | llehtahw | create | |
|