possibly trivial newbie list/array question

Gareth McCaughan Gareth.McCaughan at pobox.com
Fri Aug 24 17:29:55 EDT 2001


Tim Peters wrote:

[about list comprehensions]
> Maximal clarity in common cases.  See design docs for the Haskell language,
> from which Python most directly borrowed this feature; Haskell in turn
> adapted it from the SETL language; SETL in turn adapted the notation from
> set theory; the name "comprehension" comes from the set-theoretic so-called
> Axiom of Comprehension, more directly relevant to forms with an "if" clause.

And it should really be called "separation" rather than
"comprehension", since set theorists use "comprehension"
to mean constructing { x : P(x) } and "separation" to mean
constructing { x in y: P(x) }.

-- 
Gareth McCaughan  Gareth.McCaughan at pobox.com
.sig under construc



More information about the Python-list mailing list