|
|
|
|
|
by shadowgovt
1379 days ago
|
|
It's not about the why, it's about the fact that because it's possible, the language has to allow for it. 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. |
|
The error message is slightly obtuse, says something like "variable only used once." But is clear after inspection the first time.