python: exception catching and isinstance gotcha (beginner - intermediate) anthony explains
Vložit
- čas přidán 23. 02. 2021
- today I talk about exception handling in python, how to handle multiple types, how to handle variables types, and the difference between `except` and `isinstance`
- NoReturn vs None: • python return annotati...
- don't use blank except: • what's wrong with pyth...
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/asottile
stream github: github.com/anthonywritescode
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below! - Věda a technologie
Thanks for the awesome explanation! Now it makes more sense, even it does feel like a bug xD
in which video did you explain this syntax
raise ValueError("Some error") from None. I cannot find it 😢
czcams.com/video/wc6W-RaMJ7k/video.html
I looked for `raise from` on github.com/anthonywritescode/explains
2:28 how would the ordering work? aka if u have 2 exceptions on the same level (I assume AssertionError would be catched before Exception?) which would be catched?
they're run in-order
Bug is an unexpected behavior so that thing is a bug :-)