Skip to content

gh-145902: Ensure division by zero raises ZeroDivisionError#145903

Closed
pb21314 wants to merge 2 commits intopython:mainfrom
pb21314:fix-division-zero
Closed

gh-145902: Ensure division by zero raises ZeroDivisionError#145903
pb21314 wants to merge 2 commits intopython:mainfrom
pb21314:fix-division-zero

Conversation

@pb21314
Copy link

@pb21314 pb21314 commented Mar 13, 2026

Fix incorrect handling of division by zero so that Python consistently raises
ZeroDivisionError.

Example:

>>> 10 / 0
ZeroDivisionError: division by zero

Please enter the commit message for your changes. Lines starting
@bedevere-app
Copy link

bedevere-app bot commented Mar 13, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@da-woods
Copy link
Contributor

Superficially this like a lot like #145798

Copy link
Member

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is essentially a duplicate of closed pr #145798.

@pb21314, please don't reopen closed pr's without prior discussion.

@skirpichev skirpichev closed this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants