[issue41591] Comprehensions documentation

Walid Taha report at bugs.python.org
Thu Aug 20 14:27:43 EDT 2020


Walid Taha <wtaha at fb.com> added the comment:

That makes perfect sense now, and I see what threw me off. Basically, there were not enough cues for me to see that there was an extra pair of square brackets in the example that had nested listcomps, and as a result, I assumed that a nested listcomp simply meant one with multiple for clauses in it (which you clarified is not considered a nested listcomp).

If I may make a suggestion, the phrase "the nested listcomp is evaluated" would not have confused me if it simply said "the main part of the outer listcomp is evaluated". This can help in two ways. First, it avoids the possible confusion that the discussion in the previous section was about nested listcomp (which you rightly point out it is not). Second, adding the word "outer" gives an additional cue that we actually have two nested listcomps here.

Thank you very much for your quick response and help with this issue!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41591>
_______________________________________


More information about the Python-bugs-list mailing list