declaration of variables?
tatsujin at spamgoeshere.despammed.om
Sat Feb 15 18:05:09 CET 2003
Being a Python-n00b, in the midst of this ?: discussion, it occurred to me that
Python does not require variables be delcared before use.
Why is this so? Isn't it very helpful if the compiler complains rather than having
strange run-time results?
valeu=initialValue # <-- Note the spelling error.
Surely, in an elightened language like Python it shouldn't be possible to do this
kind of error without the compiler complaining.
The compiler.compileFile() function doesn't complain either, nor does pychecker seem
to. It's almost as if it was by design... is it?
More information about the Python-list