etymology of "list comprehension"?
Terry Reedy
tjreedy at udel.edu
Thu Nov 6 19:11:27 EST 2008
mh at pixar.com wrote:
> I googled and wiki'ed, but couldn't find a concise clear answer
> as to how python "list comprehensions" got their name.
>
> Who picked the name? What was the direct inspiration, another
> language? What language was the first to have such a construct?
>
> I get that it's based on set notation.
The etymology of 'com-prehend' is with-grab, where prehend comes from
the same Latin verb as prehensile (able to grab). A set comprehension
(which has also been called things like 'set-builder notation') includes
or grabs the whole set in one expression, instead of listing members
one-by-one.
tjr
More information about the Python-list
mailing list