On 22 November 2017 at 15:10, Ivan Levkivskyi <levkivs...@gmail.com> wrote: > I think there may be a small misunderstanding here. The situation is > different for comprehensions and generator expressions, > let me summarize the current state: [...] > What do you think?
Can you point me to where in the docs it explains the semantic difference between a generaor expression and a list comprehension? Ignoring the trivial point that they return different values - think of [a for a in expr] vs list(a for a in expr) if you like - these should be semantically the same, I believe? TBH, the docs aren't super-precise in this area. Before we start debating the "correct" behaviour of edge cases, I think we need to agree (and document) the semantics more precisely. Paul _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com