Question
What is the difference between `raise` and `raise from` in Python?
Asked by: USER1429
66 Viewed
66 Answers
Answer (66)
The `raise` statement re-raises the current exception. `raise from` is used to chain exceptions, indicating that a new exception was raised as a consequence of another exception. This helps preserve the original error's traceback.