Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is becoming (has become?) an established part of the culture -- "Lambda in a `map`? Use a list comprehension instead."

Which is annoying, because there are times when using map or filter is cleaner; for example, if you're doing pipeline-y stuff, using the function-based approach is much easier to read and reason about than doing a bunch of nested comprehensions.

I also tend to think people don't use itertools enough. But it catches people by surprise enough that several of my messing-with-interviewers canned solutions to common problems make heavy use of itertools (including a FizzBuzz which contains no 'for' or 'if' statements).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: