[Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...] (original) (raw)
Brett Cannon brett at python.org
Sat Jul 7 16:21:08 EDT 2018
- Previous message (by thread): [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]
- Next message (by thread): [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jul 6, 2018, 16:32 Guido van Rossum, <guido at python.org> wrote:
On Fri, Jul 6, 2018 at 4:19 PM Terry Reedy <tjreedy at 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/Listcomprehension). 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/Builderpattern) 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.
-Brett
-- --Guido van Rossum (python.org/~guido)
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180707/76233c2e/attachment.html>
- Previous message (by thread): [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]
- Next message (by thread): [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]