Rustacean Station  cover image

Code Like a Pro in Rust with Brenden Matthews

Rustacean Station

CHAPTER

How to Handle Exceptions in Python

A result is like either you have a result or you have an error usually. In either case, whenever you're handling that, like 99.9% of the time, the right thing is to match and then just handle both cases. And if it's a case where like you call a function and it returns a result or an option, then you just handle it once. Now with with result, of course, you can use the question mark operator,. You could essentially use the call stack as like a way of sort of handling exceptions. Russ doesn't have exceptions in like the like Python or Ruby or C++ way, or like Java or anything. But you can you can basically emulate

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner