Re:Why I'm still using Python
by maxbond on Friday December 30, 2022 @04:34PM
(#34190383)
IMHO the key to legible comprehensions is to use them only to express composition and to put the logic into verbosely named functions.
Chained pipelines (`foo.filter(...).map(...)`) are fine to me, certainly more verbose then comprehensions for better & worse, but I get lost in pipelines expressed as nested functions (`map(filter(a, ...), ...)`).
Chained pipelines (`foo.filter(...).map(...)`) are fine to me, certainly more verbose then comprehensions for better & worse, but I get lost in pipelines expressed as nested functions (`map(filter(a, ...), ...)`).