hpython icon indicating copy to clipboard operation
hpython copied to clipboard

`locals()` and `globals()` messes with scope checking

Open LightAndLight opened this issue 6 years ago • 0 comments

There are three mutable, globally accessible dicts called locals() and globals(), and vars(). When these dicts are modified, new variables are brought into scope. Warn about these usages. Warnings should only occur when it's the built-in definitions that are accessed. If a variable called globals is introduced, shadowing the original, then there's no issue.

LightAndLight avatar Feb 12 '19 03:02 LightAndLight