Python Bytes cover image

#197 Structured concurrency in Python

Python Bytes

00:00

Python's Error Handling Patterns

Python naturally leans towards one style of error handling, but there might be times you don't want to use it. The ask for forgiveness style is just try with open this thing and catch an exception. But the look before you leap style involves a lot more checks like something you might do in C code. It's 30% slower to do theLook before you leap because you're doing an extra test. And basically, the try except block is more or less free.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app