Message340708
| 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: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 | |