[Paul Prescod] > ... > Along the same lines, might a new rule make Python code more robust? > We could say that a local can only shadow a global if the local is > formally declared. It's pretty rare that there is a good reason to > shadow a global and Python makes it too easy to do accidentally. I've rarely seen problems due to shadowing a global, but have often seen problems due to shadowing a builtin. Alas, if this rule were extended to builtins too-- where it would do the most good --then the names of builtins would effectively become reserved words (any code shadowing them today would be broken until declarations were added, and any code working today may break tomorrow if a new builtin were introduced that happened to have the same name as a local).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4