in reply to Re: The value of declarations
in thread The value of declarations
Agreed re Python's scoping (Porculus) although it's gotten much better over the years, with the addition of the nonlocal keyword being the most recent addition.
You can run pychecker or pylint to find errors in sourcecode. The places I can think of offhand where you could get caught with assignments is a/ to non-existent local variables, b/ to non-existent object member variables, c/ to member variables of the wrong object, and d/ to non-existent hash keys. Problems a/ and b/ are lintable. Problems of types c/ and d/ require mindreading to fix (although you could use a frozendict for type d/)
Cheers, -T. (that's more than enough trespass for the moment ;-)
|
|---|