[Python-Dev] Visibility scope for "for/while/if" statements

Terry Reedy tjreedy at udel.edu
Thu Sep 22 20:00:55 CEST 2005

"Alexander Myodov" <maa_public at sinn.ru> wrote in message 
news:1477206818.20050922160515 at sinn.ru...
> Why the variables defined inside "for"/"while"/"if" statements
> (including loop variables for "for") are visible outside this scope?

Questions about why Python is the way it is belong on comp.lang.python, the 
general Python mailing list, or gmane.comp.python.general (they are all 
gatewayed to each other).  Moreover, they are likely to have been asked, 
answered, and discussed previously, with the answers possibly discoverable 
thru Google search of the c.l.p archives.  This one certainly has been. 

More information about the Python-Dev mailing list