Skip to content

Fixes #133895#133923

Closed
abhigyan631 wants to merge 2 commits intopython:mainfrom
abhigyan631:fix-math-errors
Closed

Fixes #133895#133923
abhigyan631 wants to merge 2 commits intopython:mainfrom
abhigyan631:fix-math-errors

Conversation

@abhigyan631
Copy link
Copy Markdown

 This PR modifies the error handling in math and cmath modules to include the computed result value when raising ValueError and OverflowError exceptions. This is particularly useful for applications that need to adhere to C99 Annex G recommendations.

 Changes made:
 - Modified is_error() in mathmodule.c to include computed result value
 - Modified math_error() in cmathmodule.c to include computed result value
 - Added tests to verify the changes

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented May 12, 2025

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.

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot bot commented May 12, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented May 12, 2025

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.

@AA-Turner
Copy link
Copy Markdown
Member

cc @skirpichev, but this PR feels LLM-generated.

@skirpichev
Copy link
Copy Markdown
Member

this PR feels LLM-generated.

Yes, it looks so.

@abhigyan631, please note that referenced issue is already assigned. I would like to see first some feedback from developers with relevant knowledge to see if that feature actually does make sense.

Take look on issues with an "easy" label, there are a lot of them, 100+. If no one currently works on issue (no prs, it's not assigned) - feel free to make a pr. Please also take look on the https://devguide.python.org/ and https://devguide.python.org/getting-started/generative-ai/.

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