On 22.10.2016 09:50, Alexander Heger wrote:
Well, an argument that was often brought up on this forum is that Python should do things consistently, and not in one way in one place and in another way in another place, for the same thing.
Like * in list displays? ;-)
Here it is about the order of loop execution. The current behaviour in comprehension is that is ts being done the same way as in nested for loops.
It still would. Just read it from right to left. The order stays the same.
Which is easy enough to remember. Same way, everywhere.
I am sorry but many disagree with you on this thread.
I still don't understand why the order needs to be one-way anyway. Comprehensions are a declarative construct, so it should be possible to mix those "for .. in .."s up in an arbitrary order.