
#404: Clean Code in Python
Talk Python To Me
00:00
The Sixth Tip on Python Errors
Always name your exceptions, right? So sometimes I see try accept colon and then we're like, what's exception? We got that will just catch anything, right? Always be explicit in the exception. When you put that in there, there's no more errors in the code. It just keeps running. And if I put accept colon and just keep going, way more reliable. What's the same? The center Python error should not pass silently. Yes. That's one of the Python or idiomatic things of Python, right? But there's a whole bunch more.
Transcript
Play full episode