You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve AC generated code for conversion of int to Py_ssize_t #162749
When arg is already an int, which is the common case, a redundant incref/decref pair is generated. The n format unit of PyArg_Parse*() and PyNumber_AsSsize_t() follow the same pattern.
Maybe support __index__() dunder consistently across PyLong_As*() methods?
That would be nice, as currently it is not consistent. It is however a stable ABI change, and there have been objections to such changes. See capi-workgroup/decisions#32
Activity
skirpichev commentedon Nov 27, 2026
Maybe support
__index__()dunder consistently acrossPyLong_As*()methods?eendebakpt commentedon Nov 29, 2026
That would be nice, as currently it is not consistent. It is however a stable ABI change, and there have been objections to such changes. See capi-workgroup/decisions#32