atom feed11 messages in org.python.python-3000[Python-3000] end scope of iteration ...
FromSent OnAttachments
Nicholas TApr 16, 2008 5:51 pm 
Nicholas TApr 16, 2008 6:25 pm 
Amaury Forgeot d'ArcApr 17, 2008 1:47 am 
Guido van RossumApr 17, 2008 8:00 am 
Nicholas TApr 18, 2008 1:10 am 
Facundo BatistaApr 18, 2008 6:14 am 
Richard ThomasApr 18, 2008 8:28 am 
Alex MartelliApr 18, 2008 8:57 am 
Robin StockerApr 18, 2008 9:02 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:51:48 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