variable declaration
Robert Brewer
fumanchu at amor.org
Mon Jan 31 00:33:22 EST 2005
AlexanderZatvornitskiy wrote:
> I'am novice in python, and I find one very bad thing (from my
> point of view) in
> language. There is no keyword or syntax to declare variable,
> like 'var' in
> Pascal, or special syntax in C. It can cause very ugly
> errors,like this:
>
> epsilon=0
> S=0
> while epsilon<10:
> S=S+epsilon
> epselon=epsilon+1
> print S
>
> It will print zero, and it is not easy to find such a bug!
>
> Even Visual Basic have 'Option Explicit' keyword! May be,
> python also have such
> a feature, I just don't know about it?
The feature is called "pychecker", and, although it isn't included in
the standard distribution, it's readily available:
http://pychecker.sourceforge.net/
Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org
More information about the Python-list
mailing list