Built-in Exceptions
ArithmeticError — exception class
Family of numeric failures, including division by zero, overflow and floating-point errors. A handler for this base class handles those subclasses, but not every invalid numeric argument. Catch ArithmeticError when this category is the recovery boundary; do not rely on the exact human-readable message.
Formal Syntax & Structure
python syntaxpython
ArithmeticErrorReturn Value
type
The class object ArithmeticError; this reference documents the class identity, not a universal constructor signature.
Working Example
Example Snippetpython
try: 1 / 0except ArithmeticError as error: print(type(error).__name__)