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

Wow, this is nice. I've been doing Python for quite a few years and whenever I needed a nested comprehension I'd always have to go to my cheatsheet. Now that I've seen how it's composed that's one less thing I'll need to lookup again. Thank you.


It's a fairly clunky idiom and there's no reason to use it if you prefer more explicit code.

I can see the attraction for terse solutions, but even the name is questionable. ("Comprehension?" Of what? It's not comprehending anything. It's a filter/processor.)




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

Search: