|
|
|
|
|
by mixmastamyk
1380 days ago
|
|
While theoretically possible, this doesn’t happen unless you’ve put effort into destabilizing the code on purpose.
Folks monkeypatch to fix problems, not create them. You can explicitly mark a nonlocal or global as well. Now if your project needs to be impervious to malicious actors, additional safeguards will be needed. But I’ve never encountered this situation in a long career. |
|
Unless I'm mistaken (and please correct me if I am), no Python linter can address the fact that
`y = myVoriable + 3`
... is valid Python code because there's no way to know a-priori that `myVoriable` isn't a valid global variable, even though human inspection makes it obvious that it's a typo on `myVariable`. For that reason, there's a practical limit on how much static error checking Python allows as per the design of the language.
Has this been changed in the past decade? If so, I should give this language another chance.