

Exceptions allow you to write code which may not work, and then handle the successful and failed cases separately. The four clauses in Python Exception handling are try, except, else, and finally. These give you the ability to handle an error (except), a success (else), or either (finally). Today we introduce the most common types of exceptions in Python, and then show you how to use all 4 exception clauses.
➢➢➢➢➢➢➢➢➢➢
We would like to thank our Patrons “Birds Eat Bees”, Juan Guillermo Henao, Andrew Mengede, Martin Stephens, Carlos Araujo, and Tracy Karin Prell. Their generous support on Patreon helped make this video possible.
➢➢➢➢➢➢➢➢➢➢
To learn Python, you can watch our playlist from the beginning:
➢➢➢➢➢➢➢➢➢➢
To help us continue making videos, you can support Socratica at:
Patreon:
Socratica Paypal:
We also accept Bitcoin! 🙂
Our address is: 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
Thank you!!
➢➢➢➢➢➢➢➢➢➢
If you’d like a reference book, we recommend “Python Cookbook, 3rd Edition” from O’Reilly:
The Mythical Man Month – Essays on Software Engineering & Project Management
➢➢➢➢➢➢➢➢➢➢
You can also follow Socratica on:
- Twitter: @socratica
- Instagram: @SocraticaStudios
- Facebook: @SocraticaStudios
➢➢➢➢➢➢➢➢➢➢
Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Michael Harrison (@mlh496 on Twitter)
➢➢➢➢➢➢➢➢➢➢
Yoda, Star Wars The Exhibition, Madrid
Author: Daniel Huntley
source
We're halfway there. We still need your help! Support Socratica Python Kickstarter: http://bit.ly/PythonKickstarter
The xfiles couldn't be found? IT'S A COVER UP!
Support what you love! Socratica has a Kickstarter to make more Python: http://bit.ly/PythonKickstarter
Exceptional quality content!!
@3:03 HAHAHA
Please can you do video on Python Django
super presentation
Aside from the fact that else clause is unreachable, great video
1:18 I am going to deliberately make mistakes in my code. The mere thought of this causes my neural nets rebel, but this is for a good cause. LOL.
byteNotFound exception
I'm so poor I can't even pay attention.
Ahhh it burns nooo … once you run return it doesn't execute anymore in that def. returning the data at that phase doesn't call f.close() you've got an open file pointer … oh it burns nooooo.
Edit:I guess after all these years I don't know python.
def myTest():
try:
print ("hi")
return "I'm not returned."
except Exception as e:
print("{}".format(e))
else:
return "The else isn't returned either."
finally:
print("I shouldn't print because we returned already, but I do.")
return "This is so weird … I'm returned."
return "If I'm returned the world makes no sense."
print(myTest())
### Output
hi
I shouldn't print because we returned already, but I do.
This is so weird … I'm returned.
I think I just found my favorite Python tutor. Also, I think I'm in love.
If you fail to plan for failure, you're a failure planning to fail.
Even i have girlFriendNotFoundError
i think i got a worng version of python
Why is the women wearing the same dress in every episode
That's a brilliant way to demonstrate concepts.
That's the reason why this is the only youtube channel on which I like every video I watch. And, probably, in future, when I start earning, I will stop raising MoneyNotFoundError. 🙂
Wow! Incredible
I love how you can be dead serious and still funny at the same time.
mathematical SIN !! this is intense
Wow! Love Socratica, Love you Ulka!
Wow, that introduction!
Not subscribing to this channel is a sin.
I wonder if there are any out-takes of the actor laughing whilst recording these…..