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

That's Ruby, if I'm not mistaken. In Python you'd do

filter(lambda e: e.isFoo, items)



It's more Pythonic to write

    [e for e in items if e.isFoo]




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

Search: