Lisp-likeness
Ville Vainio
ville at spammers.com
Thu Mar 17 01:49:26 EST 2005
>>>>> "Michele" == michele simionato <michele.simionato at gmail.com> writes:
Michele> But then why he agreed to have the loop variable
Michele> disappear outside a generator comprehension? I think
Michele> there is something more than a backward compatibility
Michele> concern.
With normal for-loop (as opposed to genexps and LCs), the "last" value
of the loop variable might be useful outside the loop if the loop was
exited prematurely through 'break' statement or exception.
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list