-
Notifications
You must be signed in to change notification settings - Fork 0
Errors
Alejandra Rodriguez Garcia edited this page Aug 15, 2022
·
3 revisions
- Syntax Errors are "errors before execution", when the text of a Python program is not syntactically valid. The line print "Hello" is missing parentheses around the print function.
- Exceptions are "errors during execution," when Python encounters some error while executing the code. The line print(spam) might fail if the name spam cannot be resolved.
Reference: https://docs.python.org/3/library/exceptions.html#exception-hierarchy https://docs.python.org/3/library/exceptions.html https://docs.python.org/3/tutorial/errors.html https://docs.python.org/3/library/exceptions.html#exception-hierarchy https://docs.python.org/3/tutorial/erroars.html#raising-exceptions