On Fri, Jul 6, 2018, 16:32 Guido van Rossum, <guido@python.org> wrote:
On Fri, Jul 6, 2018 at 4:19 PM Terry Reedy <tjreedy@udel.edu> wrote:
Since Guido, the first respondent, did not immediately shoot the idea
down, I intend to flesh it out and make it more concrete.

Maybe I should have shot it down. The term is entrenched in multiple languages by now (e.g. https://en.wikipedia.org/wiki/List_comprehension). Regarding "list builder" one could argue that it would just add more confusion, since there's already an unrelated Builder Pattern (https://en.wikipedia.org/wiki/Builder_pattern) commonly used in Java. (Though I worry about the presence of a Python example in that Wikipedia page. :-)

Also, "generator builder" is not much more expressive than "generator expression", and the key observation that led to this idea was that it's such a mouthful to say "comprehensions and generator expressions". Maybe it's not too late to start calling the latter "generator comprehensions" so that maybe by the year 2025 we can say "comprehensions" and everyone will understand we mean all four types?

FWIW more people should start using "list display" etc. for things like [a, b, c].

I can get behind "generator comprehension" and "list display". The builder idea isn't doing it for me.


--Guido van Rossum (python.org/~guido)
Python-Dev mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett%40python.org