permuting several lists (was Re: [Python-Dev] zip() and list-comprehension with commas)

Eric S. Raymond
Wed, 12 Jul 2000 21:06:57 -0400

Guido van Rossum <>:
> Yes, I agree.  Main reason: it's trivial to combine this with list
> comprehensions, while the ';' notation had real problems there.

Perhaps this frees up semicolon for use in the list-comprehension constructor 
syntax.  BTW, I think whoever it was that suggested lazy eval for 
comprehensions was right on -- but that ties into the larger issue of
generators and continuations.  Really, a list comprehension ought to
be syntactic sugar for an Icon-like generator object.
> My bid for a name: splice().

Wearing my English-usage-pedant hat, I must regretfully judge this
inferior to weave().  The reason has to do with the spatial geometry
implied by the verbs.  

You *splice* two ropes together end-to-end; the proper data-structure
analogy is with concatenation, and indeed splice() in Perl is a sort
of generalized slice'n'dicer for sequences.

On the other hand, you *weave* two threads together side by side to
form a parallel bundle.  Much closer image.

OTOH, MAL's group of related constructors is pretty cool.
		<a href="">Eric S. Raymond</a>

The real point of audits is to instill fear, not to extract revenue;
the IRS aims at winning through intimidation and (thereby) getting
maximum voluntary compliance
	-- Paul Strassel, former IRS Headquarters Agent Wall St. Journal 1980