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

Ah yes, that's another reason I do it, but I failed to mention. If you see "if not x:" then you're left wondering what x is (a boolean presumably), but "if len(x) == 0:" let's you know you're checking to see if a container is empty.


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

Search: