Closed mnieber closed 1 year ago
The exception handling needs to go around the function call, not the dispatch. But additionally another method call would add overhead in the critical path.
I'm not sure about the goal here: just to step over 1 line instead of 3?
I'm not sure about the goal here: just to step over 1 line instead of 3?
Yes, that was the idea. But I agree that avoiding another method call is more important (so I will close this).
When you debug into a multimethod, you will first step into the
__call__
function and then into the target function. This makes debugging a bit more cumbersome. Unfortunately,pudb
(orpdb
, I guess) does not allow you to ignore themultimethod
code (that would be the best solution). However, the call code could be changed to make it quicker to pass through it in the debugger: