Comprehensions, Where Art Thou?

Tab Atkins Jr. jackalmage at gmail.com
Mon Aug 11 09:56:48 PDT 2014


On Mon, Aug 11, 2014 at 7:20 AM, Kevin Smith <zenparsing at gmail.com> wrote:
>> I would also like to point out that (from my experience) this heavy,
>> multiline usage of comprehensions is atypical from the Python point of view.
>> Comprehensions tend to be short and sweet.  That is their niche.
>
> Although, my experience is more limited than others'.

No, that's standard.  It's not Pythonic to have comprehensions that
large, as it obscures rather than enlightens, particularly some of
those crazier nested ones that Dave is using.  If your comprehension
doesn't fit in 80chars, you're probably doing something wrong, and
should break it down to a real for loop.

~TJ


More information about the es-discuss mailing list