The last data i read about the “try/catch” vs. “if in” for performance was around 10% or less of your tests are going to hit then use try/catch. Unfortunately I can’t find that reference.
It's a shame that there was no talk about the Common Lisp condition system, which I think you can take inspiration from, seeing that python is already a dynamic language and has closures support...
You can catch a SyntaxError coming from an import, from eval, etc. But yeah, you can't catch it if your error is in the same module, because the module code hasn't even started to run when the error is emited.
00:51 Introduction
03:17 Exception
06:35 Reasons for exceptions
09:52 Exception use cases
13:46 Design by Contract
17:42 Recovering from errors
23:49 Lessons Learned
25:29 QnA
The last data i read about the “try/catch” vs. “if in” for performance was around 10% or less of your tests are going to hit then use try/catch. Unfortunately I can’t find that reference.
It's a shame that there was no talk about the Common Lisp condition system, which I think you can take inspiration from, seeing that python is already a dynamic language and has closures support...
You can catch a SyntaxError coming from an import, from eval, etc.
But yeah, you can't catch it if your error is in the same module, because the module code hasn't even started to run when the error is emited.
This talk Is understandable with 0.75 speed option :)
I like to think that in her free time, the speaker pursues her passion of being an auctioneer...
@@RoamingAdhocrat I've thought about it :) Or impressively fast rapping.