ArithmeticError
The built-in parent class of the errors raised by failed arithmetic, such as ZeroDivisionError.
In more detail
An except ArithmeticError clause catches a division by zero. It sits under Exception in the hierarchy, alongside LookupError, TypeError and ValueError.
Related terms
- ZeroDivisionError — The exception raised when a program divides by zero or takes a remainder by zero.
- exception hierarchy — The family tree of exception classes, with BaseException at the top and Exception above nearly every error you will catch.
Taught in
- The Exception Family Tree — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Try, Except, Else And Finally — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Twelve Traps, One Shape Each — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Handlers, args, raise And assert — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Exception Classes Of Your Own — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep