[Python-Dev] PEP 3142: Add a "while" clause to generator expressions
tjreedy at udel.edu
Wed Jan 21 21:42:05 CET 2009
Steven D'Aprano wrote:
> On Wed, 21 Jan 2009 03:10:24 pm Terry Reedy wrote:
>> Steven D'Aprano wrote:
>>> The three clauses are neither in the same order, nor are they in
>>> reverse order.
>> They are in the same order but rotated, with the last brought around
>> to the front to emphasize it. Did you really not notice that either?
> There are only three items, of course I noticed that there is *some*
> rearrangement of the first that leads to the second. Out of the six
> possible permutations of three items, they can all be described in
> terms of some sort of reflection, rotation or swap.
Irrelevant. *Every* comprehension, no matter how many clauses, rotates
the expression from last to first and keeps the clauses in the same
order with the same meaning. Simple rule.
>> Ironically, in a thread cross-posted on c.l.p and elsewhere, someone
>> just labeled Python's comprehension syntax as "ad hoc syntax soup".
> Is that Xah Lee? It sounds like the sort of thing he'd say.
It was the thread he started, but not him. He contributed other idiocies.
Terry Jan Reedy
More information about the Python-Dev