In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alexander Zatvornitskiy) wrote:
> And, one more question: do you think code like this: > > var S=0 > var eps > > for eps in xrange(10): > S=S+ups > > is very bad? Please explain your answer:) Let me answer that by way of counter-example. Yesterday I was writing a little perl script. I always use "use strict" in perl, which forces me to declare my variables. Unfortunately, my code was giving me the wrong answer, even though the interpreter wasn't giving me any error messages. After a while of head-scratching, it turned out that I had written "$sum{x} += $y" instead of "$sum{$x} += $y". The need to declare variables didn't find the problem. I *still* needed to test my work. Given that I needed to write tests anyway, the crutch of having to declare my variables really didn't do me any good. -- http://mail.python.org/mailman/listinfo/python-list