A) It's explicitly a functional programming primer - the goal is to stick to that style's idioms. The author explicitly states they are not being Pythonic, but functional.
B) This argument holds for the programmer who has never before interacted with map or filter. The functions are standard across many languages, and after a handful of uses are much more concise and just as clear and easy to read as a Python list comprehension, perhaps more so due to their ubiquity.
Note: This post and the author's article are explicitly not about what the idiomatic Python is for these situations.
3 comments
[ 3.0 ms ] story [ 16.9 ms ] threadB) This argument holds for the programmer who has never before interacted with map or filter. The functions are standard across many languages, and after a handful of uses are much more concise and just as clear and easy to read as a Python list comprehension, perhaps more so due to their ubiquity.
Note: This post and the author's article are explicitly not about what the idiomatic Python is for these situations.