Nested For and While Statements

Zentrader zentraders at
Tue Sep 25 19:07:37 CEST 2007

Scope had to do with "visibility" and not with how memory was
allocated.  Scope means, can this line of code access that block of
memory.  Note that in list comprehension, [x for x in (1, 2, 3)], the
for loop allocates memory the same way, but the scope changes so that
"x" is visible outside the for loop, so I guess we will have to agree
to disagree.

More information about the Python-list mailing list