Hacker News new | past | comments | ask | show | jobs | submit login

Thank you! Was starting to think I got all my codebase wrong and misunderstood what is « pythonic »

So doing this in python is ok (fastest way to check if a key is in a dict is catching KeyError for example, if I remember correctly)




Yes, do not let the HN anti-exception crusaders gaslight you. I still remember when I "discovered" exceptions in programming - "this is so much cleaner!"

All this theoretical mumbo jumbo is just noise. Very few of us are dealing with the type of programming every day where exceptions can actually become a noticeable bottleneck.




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

Search: