Re:Anti-Patterns in Python Programming
by lolpep8 on Wednesday July 09, 2014 @10:22AM
(#8009738)
Map and filter, of course; less syntactical noise, simple function semantics, and plenty of precedent and equivalents in all other languages.
[ Parent
| on HN ]
It's not like list comprehensions lack equivalent in other languages. Let's take Haskell for example.
Python lists comprehension could use a where clause from Haskell though so one could really pack everything into a one-liner :)
(as it is now, list comprehensions requiring various references to result of a function call evaluate the function each time it's used)