[Types-sig] Type Inference II

skaller skaller@maxtal.com.au
Tue, 21 Dec 1999 04:36:58 +1100


Tim Peters wrote:
> > ...
> > Tightening up for loops will break code that does things like:
> >
> >       (1) do extra increments on an loop variable to skip cases
> 
> Nope.  Assigning to the loop variable has no effect on the values assigned
> *to* it by the for stmt:
> 
> >>> for i in range(5):
>         print i
>         i = i ** 10
>         print i

	Ooops. You're right. Comment withdrawn. [Anyone that actually
wrote that should probably be withdrawn too :-]
 
-- 
John Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
voice: 61-2-9660-0850