What's the pythonic way of declaring variables?

Posted by the_drow on Stack Overflow See other posts from Stack Overflow or by the_drow
Published on 2010-02-06T15:09:32Z Indexed on 2010/05/06 18:18 UTC
Read the original article Hit count: 377

Filed under:
|
|

Usually declaring variables on assignment is considered a best practice in VBScript or JavaScript , for example, although it is allowed.

Why does Python force you to create the variable only when you use it? Since Python is case sensitive can't it cause bugs because you misspelled a variable's name?

How would you avoid such a situation?

© Stack Overflow or respective owner

Related posts about python

Related posts about best-practices