classification
Title: Rename "generator expressions" to "generator comprehensions"
Type: Stage:
Components: Documentation Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: GeekyShacklebolt, brett.cannon, docs@python, rhettinger, serhiy.storchaka
Priority: low Keywords:

Created on 2018-07-15 00:27 by brett.cannon, last changed 2018-08-14 00:53 by rhettinger.

Messages (5)
msg321670 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-07-15 00:27
The idea came up on python-dev to tweak the names of generator expressions to "generator comprehensions" to align more with list|set|dict comprehensions. This would be strictly a doc change (for now). A reference to generator expressions should be left if nothing else than to point to the new name.
msg321676 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2018-07-15 03:28
Guido asked me to try this out on students.  I'll report back after next week's class.
msg321678 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-15 05:40
There are also few differences between comprehensions and generator expressions. The author of the patch should not just replace all occurrences of "generator expression" with "generator comprehension", but analyze all occurrences of the sole "comprehension" and replace it with "non-generator comprehension" if needed.
msg323484 - (view) Author: Shiva Saxena (GeekyShacklebolt) * Date: 2018-08-13 15:13
I am interested to work on this issue. It would be my first contribution in cpython. Should I go ahead?
msg323496 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2018-08-14 00:53
Results from two Python courses:

* In terms of teaching gexexps, there was no net gain or loss.  When genexps are show side-by-side with list/dict/set comps the symmetric relationship was obvious regardless of terminology.

* In terms of being able to search StackOverflow, blog posts, and external resources, the new terminology made the resources unfindable.

* When using the new terminology, I did get questions that never came up before, "why don't the parentheses mean tuple-comprehension".

Based on those results, I recommend we keep the terminology the same as it is now.  The loss of searchability isn't worth it (there doesn't seem to be any upside) and it is concerning that a new category of confusion (list/tuple comprehension) seems to be arising from the change in terminology.
History
Date User Action Args
2018-08-14 00:53:51rhettingersetmessages: + msg323496
2018-08-13 15:13:28GeekyShackleboltsetnosy: + GeekyShacklebolt
messages: + msg323484
2018-07-15 05:40:11serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg321678
2018-07-15 03:28:58rhettingersetnosy: + rhettinger
messages: + msg321676
2018-07-15 00:27:13brett.cannoncreate