Counting nested loop iterations
Diez B. Roggisch
deets at nospam.web.de
Fri Mar 17 10:59:11 EST 2006
> I think the problem is that y is used before the loop which creates it,
> but x is used after the loop which creates it.
Well, you got me on that. Seems to be a matter of convention all the time.
> People can cope with the expanded loop form where everything it is used
> after it is introduced, and it would appear that they also cope well with
> the perl way of doing everything backwards, but moving the last element to
> the front while keeping everything else in the 'correct' order seems to
> confuse a lot of people.
>
> Oh well, just wait until Python 2.5 comes out and we get people
> complaining about the order of the new if statement.
Sad, but true. But I'm a happy camper with list-comps and the new
if-expression :)
Diez
More information about the Python-list
mailing list