tree functions daily exercise: Table

xah at xah at
Fri Jun 24 09:04:29 CEST 2005

Dear Dr Jon D Harrop,

“List Comprehension” is a special concise syntax form that
generates lists, as a way to save typing such as for loops. It is
primarily a jargon bandied about by programers which have contributed
huge misunderstandings and miscommunications. The extensiveness of this
particular jargon's harm has also encroached into functional programing
languages as to cause irregular syntax and less powerful semantics. The
utility of “list comprehension” is just a (normal) function
designed to generate list.

• A exposition of list comprehension in Python.

• Jargons of Info Tech Industry

 xah at xahlee.org

Jon Harrop wrote:
> David Hopwood wrote:
> > That's consistent with the behaviour of list comprehensions in other
> > languages -- including "set/tuple formers" in SETL
> > <>, which I believe was the
> > first language to support them. I don't know of any language where
> > a list comprehension with multiple loops creates nested lists.
> I'm not entirely sure what a list comprehension is, but Mathematica might be
> an example of a language in which multiple loops create nested lists.
> --
> Dr Jon D Harrop, Flying Frog Consultancy

More information about the Python-list mailing list