homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients docs@python, mark.dickinson, mattlong
Date 2011年12月08日.13:16:52
SpamBayes Score 0.00039976375
Marked as misclassified No
Message-id <1323350212.9.0.501961277475.issue13549@psf.upfronthosting.co.za>
In-reply-to
Content
Isn't the documentation that you refer to about *nested* list comprehensions, rather than list comprehensions with multiple 'for' clauses?
E.g.,:
 [number for row in matrix for number in row]
is not a nested list comprehension: it's merely a list comprehension with two 'for' clauses. But:
 [[number for number in row] for row in matrix]
*is* a nested list comprehension (a list comprehension for which the initial expression is itself a list comprehension), and there the advice to read from right to left seems to make sense to me.
History
Date User Action Args
2011年12月08日 13:16:52mark.dickinsonsetrecipients: + mark.dickinson, docs@python, mattlong
2011年12月08日 13:16:52mark.dickinsonsetmessageid: <1323350212.9.0.501961277475.issue13549@psf.upfronthosting.co.za>
2011年12月08日 13:16:52mark.dickinsonlinkissue13549 messages
2011年12月08日 13:16:52mark.dickinsoncreate

AltStyle によって変換されたページ (->オリジナル) /