0
Is this same like try and catch in c++ ? I'm not understand this exception topic in python
2 Réponses
+ 1
I've had no prior experience with c++,so I don't know whether it's the same. The exception feature in python deals with user errors and tries to replace the ugly looking trackback error with something simpler to notify the user about the error. Say,for example that your code asks for a number input. the exception you choose could output a variety of errors, say if the user inputs a string, a float or another data type. the exception catches this error and prevents the code from further executing
I hope this helped!!
+ 1
yes, it's the same