In <[EMAIL PROTECTED]>, Steven
D'Aprano wrote:

>> for (i = 0 ; i < 10 ; i++)
>>    i = 10;
> 
> 
> This would be written in Python as:
> 
> for i in xrange(10):
>     i = 10

Nope, in Python it's:

for i in xrange(10):
    break

I think his example should demonstrate that assigning to the loop variable
has no effect on the "loop test".  Which IMHO is a good thing.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to