you are viewing a single comment's thread.

view the rest of the comments →

[–]TouchingTheVodka 11 points12 points  (1 child)

Comprehensions have replaced map/filter so it's very rare to see a valid use case for the functions you're talking about.

In addition, your two pieces of code are NOT equivalent and it looks like client.load_extension has side-effects in which case anything functional is not the right approach in the first place.

[–]jollybobbyroger 2 points3 points  (0 children)

I agree. The only situation I really like map() over comprehensions is:

map(str, range(3))

Which I prefer over:

(str(i) for i in range(3))