Using except: is a HUGE mistake

Опубликовано: 02 Июнь 2021
на канале: mCoding
54,501
2.9k

Watch out for Exceptions vs BaseExceptions.

We look at the difference between Python's Exception objects and BaseException objects, and we consider the use cases and reasons for Python's choice to make a distinction between them. Understanding helps us understand why we shouldn't use a bare except "except: ...".

― mCoding with James Murphy (https://mcoding.io)

Source code: https://github.com/mCodingLLC/VideosS...
Python Exception Docs: https://docs.python.org/3/library/exc...
StackOverflow on GeneratorExit: https://stackoverflow.com/questions/3...

SUPPORT ME ⭐
---------------------------------------------------
Patreon:   / mcoding  
Paypal: https://www.paypal.com/donate/?hosted...
Other donations: https://mcoding.io/donate

BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord:   / discord  
Github: https://github.com/mCodingLLC/
Reddit:   / mcoding  
Facebook:   / james.mcoding  

CHAPTERS
---------------------------------------------------
0:00 Intro
0:14 BaseException vs Exception
1:53 Use specific exceptions
3:51 Problems with bare except
5:08 GeneratorExit
6:20 Outro


Смотрите видео Using except: is a HUGE mistake онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь mCoding 02 Июнь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 54,501 раз и оно понравилось 2.9 тысяч людям.