4 ms·
Thanks. On the face of it it seems a bit of a shame to me. My experience writing python daily (since before dict and set comprehensions were introduced) is that
by Myrmornis 9y ago
Thanks. On the face of it it seems a bit of a shame to me. My experience writing python daily (since before dict and set comprehensions were introduced) is that the comprehension syntax is used extremely commonly in a large codebase and that the way that you can specify both the transformation and the filtering in a single comprehension is much more readable than composing a map and a filter.