Message377373
So Issue40196 (and PR 19391) broke things for us here as Symbol.is_local() no longer works properly for symbols on the global/module scope.
Previously it would return True for all global symbols that were bound. Now it only returns True when the symbol is not used in any other scope. This means we cannot tell the difference between globals that are from the module itself, and globals that come in via imports.
This also seems to contradict this part of the language reference:
"(The variables of the module code block are local and global.)"
https://docs.python.org/3/reference/executionmodel.html
I don't see any clean workaround as there is no Symbol.is_bound() that could be used instead.
(inb4 https://xkcd.com/1172/) |
|
Date |
User |
Action |
Args |
2020-09-23 12:22:05 | CendioOssman | set | recipients:
+ CendioOssman |
2020-09-23 12:22:04 | CendioOssman | set | messageid: <1600863724.98.0.825702411391.issue41840@roundup.psfhosted.org> |
2020-09-23 12:22:04 | CendioOssman | link | issue41840 messages |
2020-09-23 12:22:04 | CendioOssman | create | |
|