-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed as not planned
Labels
Description
Bug report
Bug description:
Description
Division by zero should consistently raise a ZeroDivisionError in Python.
This issue reports an inconsistency in the current behavior where the resulting error message or handling is not aligned with the expected semantics of Python's arithmetic operations.
According to Python's specification, division by zero must raise a ZeroDivisionError to clearly indicate that the operation is mathematically undefined.
Reproduction
Minimal example:
10 / 0CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
Reactions are currently unavailable