"no variable or argument declarations are necessary."

James A. Donald jamesd at echeque.com
Sun Oct 2 16:52:21 EDT 2005


I am contemplating getting into Python, which is used by engineers I
admire - google and Bram Cohen, but was horrified to read

"no variable or argument declarations are necessary."

Surely that means that if I misspell a variable name, my program will
mysteriously fail to work with no error message.

If you don't declare variables, you can inadvertently re-use an
variable used in an enclosing context when you don't intend to, or
inadvertently reference a new variable (a typo) when you intended to
reference an existing variable.

What can one do to swiftly detect this type of bug?


--
http://www.jim.com



More information about the Python-list mailing list