atom feed11 messages in org.python.python-3000[Python-3000] end scope of iteration ...
FromSent OnAttachments
Nicholas TApr 16, 2008 5:52 pm 
Nicholas TApr 16, 2008 6:25 pm 
Amaury Forgeot d'ArcApr 17, 2008 1:48 am 
Guido van RossumApr 17, 2008 8:00 am 
Nicholas TApr 18, 2008 1:10 am 
Facundo BatistaApr 18, 2008 6:15 am 
Richard ThomasApr 18, 2008 8:29 am 
Alex MartelliApr 18, 2008 8:57 am 
Robin StockerApr 18, 2008 9:03 am 
Greg EwingApr 18, 2008 5:30 pm 
Nick CoghlanApr 19, 2008 5:01 am 
Subject:[Python-3000] end scope of iteration variables after loop
From:Nicholas T (ntu@ntung.com)
Date:Apr 16, 2008 5:52:11 pm
List:org.python.python-3000

hello all,

A few times in practice I have been tripped up by how Python keeps variables in scope after a loop--and it wasn't immediately obvious what the problem was. I think it is one of the ugliest and non-intuitive features, and hope some others agree that it should be changed in py3k.

for a in range(11): pass ... print(a)

10

Thanks, Nicholas