[Python-Dev] accumulator display syntax
gmccaughan at synaptics-uk.com
Wed Oct 22 07:15:27 EDT 2003
Tim Peters wrote:
> "Set comprehensions" in a programming language originated with SETL,
> and are named in honor of the set-theoretic Axiom of Comprehension
> (Aussonderungsaxiom). In its well-behaved form, that says roughly that
> given a set X, then for any predicate P(x), there exists a subset of X whose
> elements consist of exactly those elements x of X for which P(x) is true (in
> its ill-behaved form, it leads directly to Russell's Paradox -- the set of
> all sets that don't contain themselves).
"Aussonderungsaxiom" is the axiom of *separation*, which is
a weakened version of the (disastrous) axiom of *comprehension*.
In terms of Python's listcomps, comprehension would be [x if P(x)]
and separation [x for x in S if P(x)]. So we should be
calling them "list separations", really :-).
 Hence the name; compare English "sunder".
For the record, I like "generator expressions" too, or "iterator
More information about the Python-Dev