Hacker News new | ask | show | jobs
by uranusjr 2640 days ago
Sort of. In Python the stacktrace is always built for every step you take in code, so exceptions are not particularly costly compared to other operations. Reflection is also not relatively more costly since types are objects just like everything else.

It could even be more efficient than return value checking in certain cases.