Message340753
| Author | llehtahw |
|---|---|
| Recipients | eric.smith, llehtahw, nitishch, yselivanov |
| Date | 2019-04-24.01:50:24 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1556070624.84.0.577742168334.issue36697@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
Look at this https://github.com/python/cpython/blob/3.6/Lib/inspect.py#L1412 We are taking names from func.__code__.co_names, which also contains names of object's attributes we visited. As a result, we may get more names unexpectedly in 'globals', 'builtins', and even 'unbound'. And this example might be another case of this potentially bug >>> import inspect >>> def abc(): ... import os ... sys = None ... >>> inspect.getclosurevars(abc) ClosureVars(nonlocals={}, globals={}, builtins={}, unbound={'os'}) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-04-24 01:50:24 | llehtahw | set | recipients: + llehtahw, eric.smith, yselivanov, nitishch |
| 2019-04-24 01:50:24 | llehtahw | set | messageid: <1556070624.84.0.577742168334.issue36697@roundup.psfhosted.org> |
| 2019-04-24 01:50:24 | llehtahw | link | issue36697 messages |
| 2019-04-24 01:50:24 | llehtahw | create | |