tubeshowcase●1,361,587 videos♡ My collection 0
← Learn to Code

Learn to Code06:35

Using except: is a HUGE mistake

mCoding ↗

From the creator

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/VideosSampleCode Python Exception Docs: https://docs.python.org/3/library/exceptions.html StackOverflow on GeneratorExit: https://stackoverflow.com/questions/30862196/generatorexit-in-python-generator SUPPORT ME ⭐ --------------------------------------------------- Patreon: https://patreon.com/mCoding Paypal: https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Other donations: https://mcoding.io/donate BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/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

Published 2021-06-02 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code