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

That's also the same thought behind the Python practice of "it's better to ask forgiveness than permission".

If you're going to have a conditional that will evaluate to True most of the time, sometimes (in Python) it's considered better to just go ahead and try the logic that the conditional is guarding, and then catch the exception and handle it if it happens.



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

Search: