KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I read in an earlier answer that exception handling is cheap in Python so we shouldn't do pre-conditional checking. I have not heard of this before, but I'm relatively new to Python. Exception handling means a dynamic call and a static return, whereas an if statement is static call, static return. How can doing the checking be bad and the try-except be good, seems to be the other way around. Can someone explain this to me?
Tags (comma-separated)
Save Edits
Cancel