[Python-Dev] list comprehensions again...

esr@thyrsus.com esr@thyrsus.com
Tue, 11 Jul 2000 22:44:01 -0400

Greg Wilson <gvwilson@nevex.com>:
> > Side note: the suggested syntax here (for i in seq1 for j in seq2)
> > looks like a potential alternative for the currently proposed parallel
> > for loop syntax (for i in seq1; j in seq2).
> > 
> > Only problem: the for-for variant could be mistaken by someone used to
> > see nested loops as meaning the same as
> > 
> >     for i in seq1:
> > 	for j in seq2: ...
> Until yesterday's posting, I assumed that this is what for-for loops would
> do, i.e. that they'd deliver a cross-product rather than one-from-each.

This seems like the natural interpretation to me, also.  I therefore
prefer the semicolon sequence.
		<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>

To stay young requires the unceasing cultivation of the ability to
unlearn old falsehoods.
	-- Lazarus Long