Skip to content

Conversation

@furkanonder
Copy link
Contributor

@furkanonderfurkanonder commented May 14, 2023


i=_PyLong_AsInt(arg);
if (i==-1&&PyErr_Occurred()){
if (PyErr_ExceptionMatches(PyExc_OverflowError)){
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't change the generated Argument Clinic files directly. I'm not sure, unfortunately, if there's an easy way to implement the desired behavior while still using Argument Clinic.

@furkanonderfurkanonder added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Aug 6, 2023
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

It is an implementation detail. On platform with INT_MAX >= 2**32 it raises ValueError.

@serhiy-storchaka
Copy link
Member

Also it may raise ValueError on other Python implementation.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@furkanonder@serhiy-storchaka@JelleZijlstra@bedevere-bot