John Nagle <[EMAIL PROTECTED]> writes: > In a language with few declarations, it's probably best not to > have too many different nested scopes. Python has a reasonable > compromise in this area. Functions and classes have a scope, but > "if" and "for" do not. That works adequately.
I think Perl did this pretty good. If you say "my $i" that declares $i to have block scope, and it's considered good practice to do this, but it's not required. You can say "for (my $i=0; $i < 5; $i++) { ... }" and that gives $i the same scope as the for loop. Come to think of it you can do something similar in C++. -- http://mail.python.org/mailman/listinfo/python-list