I have been looking everywhere and just could not wrap my head around multiple exceptions. Your explanation is succinct and well demonstrated. THANK YOU! I will be going back and watching the rest of your tutorials.
I love your videos! They are very well explained and short... better than my professor's. I am writing better programs because of your videos. Your videos are a GOD send.
I have just been battling all day with coding challenges in MIT intro to computer science for the error handling section. I've watched this video once and I now get it perfectly. You're really really good at explaining stuff!
Mohammed Alzamil I have built a couple of small applications. Real estate web scraper and some audio analyzer software thing. However, it’s complete spaghetti code. Any other programmer would probably laugh lol
@@Xaminn lol ive been coding for about a month and built a coronavirus tracker and an ig bot that likes stuff and im currently upgrading it also built some shit witth tkinter using apis and shit
Awesome. Thanks for clearing that up for me. You can also raise your own custom exception such as: 'raise Exception('This is a custom error you can create.')
Always a surprise video. Other guys are good too, but they are a little confuse some times. But you always very clear such as ...Begin --- middle ---End....Good for you man.
You are awesome. As I had remarked in another of your video, you are the most efficient learning resource... Each minute is worth it. In other places, I feel like a 30 minute video should ve edited to 15-18min so that I can get the real stuff... Here I get every minutes worth... The learning is very very efficient for me!
awesome as usual !!! just wanted to add some little detail about the raise , u can do it like if(name == ''): raise Exception('name is empty , please specify a name !')
Your videos are very helpful, Corey! tyvm Also, just to point out that it is better to close the file (f.close()) within the finally block, because it will be executed anyway, while the else block runs only if the try clause doesn't raise an exception.
I saw a video before where someone said that to use try: / except: was bad because they said if something fails it should just break, but they totally missed the point of it. Try except is super useful when paired in while loops with booleans to determine whether user input is able to be converted with no issue, for example
i honestly hate try/catch and all that jazz, in c++ i could atleast choose, to use them or not, i made my own testing functions and it was better, as it was straight forward, specific to my project, doesn't clutter the code and little bit better in terms of performance. Now i'm learning python and looks like the only way to deal with errors in this language is this shit
Corey: very clear and useful introduction of all the main features and caveats....better than the Python book I'm current using to learn python. I'm not sure if you did this intentionally but you mention some points at the beginning ( and also later on ... ) that provide the motivation for exceptions to begin with. This in turn allows much better understanding of the 'else' and 'finally' clauses as well as the 'raise' Thanks for clearing the fog in my head!
Seriously, you should consider putting together a course on Udemy, or the like. I am here now because the instructor on the course I am currently doing assumed that I knew everything you just explained. Also, I note that you covered what you are doing properly and thoroughly. Not everybody is capable of doing that.
other python videos, the person just narrates what they are doing without successfully explaining the concepts behind it. this is why you need to watch corey's videos. he doesn't make videos to show others he can code, he makes them so others can LEARN!
You sir are a gift to amateur programmers.
@Abishek Raju Utoobguy
@@xfire3778 how your programming status?
@@xfire3778 Wow, you learned a lot, gg
Aiyoo namma mind Anga pogudhe 😂😂
@@REVIEWSGALATTAVanakkam nanbare
Better content here than most paid-training content.
Exactly
damn right
Totally Agree
Yep
Exactly.
These people helps us to go further even if we are not affordable of paid courses 😊
I'm a retired mainframe developer just starting out using python. Thanks for this helpful video.
I have been looking everywhere and just could not wrap my head around multiple exceptions. Your explanation is succinct and well demonstrated. THANK YOU! I will be going back and watching the rest of your tutorials.
i know right dude!
Did you get the job?
hey did u get better / continur with coding?
I love your videos! They are very well explained and short... better than my professor's. I am writing better programs because of your videos. Your videos are a GOD send.
Finally somebody who explains it well, in proper English and concisely.
I have just been battling all day with coding challenges in MIT intro to computer science for the error handling section. I've watched this video once and I now get it perfectly. You're really really good at explaining stuff!
*Puts entire project inside a Try and Except block*
LOL XD
we're not suppose to do that? uh ohh
so where did u get in programming?
Mohammed Alzamil I have built a couple of small applications. Real estate web scraper and some audio analyzer software thing. However, it’s complete spaghetti code. Any other programmer would probably laugh lol
@@Xaminn lol ive been coding for about a month and built a coronavirus tracker and an ig bot that likes stuff and im currently upgrading it also built some shit witth tkinter using apis and shit
My class doesn't explain this as well as you do i was able to easily understand this after watching this video. thank you!
This the best explanation of try / except concept ever.
did you get better with coding it's been a year
Thank you Corey....I continue to follow and grow as a self made developer. You my best teacher!!
The way you teach how to program is so great, not to mention the contents.
Awesome. Thanks for clearing that up for me.
You can also raise your own custom exception such as:
'raise Exception('This is a custom error you can create.')
Your video are many years old and still on most of the topics one of the best resscource, thanks a lot!
Thank you Corey for your time and effort. Keep spreading the knowledge.
best tut in regards to this topic on YT this seems also to be the case for other languages not only for python
I have looked around to understand this topic and finally, I found the best explanation ........good job ...please keep going and share more tutorials
Glad it helped make sense of the topic :)
always a great feeling when my "professor" links your videos. STUDENT LOANS HERE I COME!!
You made me learn many concepts in python. Ur awesone teacher
this is exactly what i was looking for, instead of defining all of the exceptions i wanted to print a message when an unwanted value was the input
7 years later, this tutorial is still helping people! xoxo
Had to donate - I've watched your Channel ALL Day. I have learned more than I deserve. Thank you!
Always a surprise video. Other guys are good too, but they are a little confuse some times. But you always very clear such as ...Begin --- middle ---End....Good for you man.
You are awesome. As I had remarked in another of your video, you are the most efficient learning resource... Each minute is worth it. In other places, I feel like a 30 minute video should ve edited to 15-18min so that I can get the real stuff... Here I get every minutes worth... The learning is very very efficient for me!
The best tutor ever! The best in the world! Thank you so much!
awesome as usual !!! just wanted to add some little detail about the raise , u can do it like
if(name == ''):
raise Exception('name is empty , please specify a name !')
This is how you learn something in 10 minuteS. THANK YOU SIR , your explanation is AMAZING.
That moment when you like a video you already liked :) Great tutorial, thanks!
Thanks for the video. I learned Exception handling from here.
word = 'currupt'
try:
if word != 'corrupt':
raise ValueError
except ValueError:
print("Corrupt is spelled wrong!")
>>> Corrupt is spelled wrong!
:-D
LOL!
N I C E
hahahaha
This type of good explaining that you do, should be taught to teachers! Thank you for all your hard work and dedication.
Now that's how to explain. Well done Corey😄😄😄😄🍻
Hi Corey, I just wanted to tell you how much I appreciate your videos. You're doing a great job, clear and concise. Thanks!
Your nice sir !
i was absent in the classroom but i had the opportunity to learn it here
I love that you, visulize this with a real error insted of faking one
Incredibly useful video
So that was why my code kept running the except block even with the right input😅
5:24 THIS IS MUCH MORE EASIER THAN READING TRACEBACK ERROR!!!!!!
Thank you So much
This is the best explanation I've read! - Thank you!
Very good explanation. Thank you!
Excellent! Loud and clear!!!! More than most of the paid courses...Thanks a lot Teacher Corey!
Thank you for explain the error handling in python. You are my favorite UA-cam teacher on python!
commenting seven years later😂Thank you for creating this video, Its really helped me understand Exceptions better.
probably most informative video on youtube
Short and simple, great video
Thank you! Much better than how my professor explained it.
Thank you so much thats what i need for my program! and also you helped me in mastering python! keep up the great work!.
Excellent explanation as to when to use this.Also by showing an example the concept just sits in head :-) Good job Corey
This exception video is exceptionally excellent
explained very well! thank you
Your videos are very helpful, Corey! tyvm
Also, just to point out that it is better to close the file (f.close()) within the finally block, because it will be executed anyway, while the else block runs only if the try clause doesn't raise an exception.
do you know why an exception is thrown when he mislabels the file name? and not the FileNotFoundError? It says ErrNo2 but shouldnt it be ErrNo1?
Very clearly organized and explained, thanks!
I could watch this perfectly at 1.75 for a quick recap/rundown. Take my like
I've been trying to learn how to do a working try/except for like a year, and nothing made sense until now. Thank you!
YEEEESSSS! Soon I will have great awesome superpowers (from knowing how to code).
I saw a video before where someone said that to use try: / except: was bad because they said if something fails it should just break, but they totally missed the point of it. Try except is super useful when paired in while loops with booleans to determine whether user input is able to be converted with no issue, for example
This is a great. Simple clear concise.Thank you
Best ever video!!! Trank you!!
Regards from Argentina.!!!!
Another awesome video, Corey! Amazingly clear and concise. Thank you.
from five years later, this is still useful.
Loved the way when you started with pass statements dude.. thank you
I like the video even before watching...when I see it is your video....
The most vivid and comprehensive explanations ever! Great videos.
This video Helped ALOT! in my game development
What are you using to make game dev in python ?
Miguel Domingos probably pygame
with python ? o_0
Its pygame :D, btw pygames pretty good for 2D games, you just need to write efficient code to get 200+ fps on complex games
Thank you so much !!!! You have just helpt me a lot !!! 10 minutes and learning so much that is so great. Again thank you very much.
You have helped me really a lot in learning programming Allah Bless you Mr.Corey Schafer
Man thank you for making this video. I finally understand!!
Thanks a ton Corey🙏 I hereby pronounce you as my ultimate Guru🙏
raise Exceptions lol, I just want to get rid of them all
Lol imagine having errors pfffff
i honestly hate try/catch and all that jazz, in c++ i could atleast choose, to use them or not, i made my own testing functions and it was better, as it was straight forward, specific to my project, doesn't clutter the code and little bit better in terms of performance.
Now i'm learning python and looks like the only way to deal with errors in this language is this shit
Thanks for the lesson Corey !
amazing video and very simple and clear explanation.
Thank you so much Corey sir.
Your video helped a lot.
Your video made my concepts clear about try/except.
good explanation, cleared almost all of my doubts
thank you very much for this video i am struggling with it from so many days
Very Nice !
You understand us each & every deep concepts of the functions.
Clear and concise. Thanks!!!
Corey: very clear and useful introduction of all the main features and caveats....better than the Python book I'm current using to learn python. I'm not sure if you did this intentionally but you mention some points at the beginning ( and also later on ... ) that provide the motivation for exceptions to begin with. This in turn allows much better understanding of the 'else' and 'finally' clauses as well as the 'raise' Thanks for clearing the fog in my head!
Perfect Tutorial. Thank you Corey
You are a real life hero!
superb explanation on exception handling in python
Best explanation about exceptional handling
This video helped me a great deal to wrap my head around this topic. Thank you very much!
Corey, thanks for these useful videos. I've watched all your videos about Python. Please consider covering scraping and regular expressions. Cheers!
+Seun Ade Thanks for the suggestions! I'll try to put some videos together on those topics.
Awesome content !! Thanks for these videos.
Thank you very much! your tutorial series is really helpful!
Why would you unlike this video. Don't understand. Thanks Corey
Very good explanation 👍
appreciate your work thanks for the video keep up the good work
Seriously, you should consider putting together a course on Udemy, or the like. I am here now because the instructor on the course I am currently doing assumed that I knew everything you just explained. Also, I note that you covered what you are doing properly and thoroughly. Not everybody is capable of doing that.
😹😹😹😹😹😹😹😹😹they always assume what they are supposed to be teaching
Best Python tute on the web
too good. So clear and no strange accent.
Well explained. Thanks a lot, mate!
Boss...you are exception for 'all paid videos explanations' 😉
Thanks bro. You explained the topic so well. I am really grateful.
Very clear explanation, thank you!
Best teacher..Thanks a ton
Thank you so much for sharing lots of videos! They are really so helpful!
Hi Corey! very well explained. Indeed it helped. Just a request to make a video on chained exceptions.
other python videos, the person just narrates what they are doing without successfully explaining the concepts behind it. this is why you need to watch corey's videos. he doesn't make videos to show others he can code, he makes them so others can LEARN!
Excellent video, Corey! Thanks so much!
Thanks, the new thing I know from this video is: "While you can already write two except, you are destroyed by 'except NameError and ValueError: '"