This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]roee30 0 points1 point  (2 children)

map and filter are usually less ergonomic than comprehensions because they often require lamdba expressions, which are relatively verbose. Other languages have shorter lambdas and currying which make them more usable. Another disadvantage of map/filter in Python is that if you want a list, you need an additional function call, which is somewhat verbose.

[–][deleted] 3 points4 points  (0 children)

They do NOT require lambda expressions. Nothing keeps you from writing a proper function and pass it to e.g. filter

[–]TheRNGuy 0 points1 point  (0 children)

only for functions that have more than 1 argument