New submission from uglemat: Today there are list comprehensions, set comprehensions, dict comprehensions and then... there are generator expressions, which apparently was called 'generator comprehensions' in the original PEP, don't know why that was changed. Some questions arises:
* Are generator expressions a type of list comprehension, or are generator expressions to be considered their own thing. * Does 'list comprehension' mean a type of comprehension that happens to return a list, or is it to be considered more of a general concept. I usually talk about 'list comprehension' as a type of comprehension, and 'generator expression' as another type of comprehension, and after investigating whether or not that is correct I couldn't find an answer. On the wikipedia article on list comprension (http://en.wikipedia.org/wiki/List_comprehension#Python) they list generator expressions as well, indicating that it's a type of list comprehension. I think there's a lot of confusion to be had here, and that the documentation should clarify what exactly is meant by 'list comprehensions', regardless of what happens to be the case. I haven't really a bug report before, so forgive me if I'm doing something wrong. :) ---------- assignee: docs@python components: Documentation messages: 194048 nosy: docs@python, uglemat priority: normal severity: normal status: open title: More elaborate documentation on how list comprehensions and generator expressions relate to each other versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18612> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com