Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 9, 2026

When comparing negative non-integer float and int with the same number of bits in the integer part, neg() in the int subclass returning not an int caused an assertion error.

Now the integer is no longer negated. Also, reduced the number of temporary created Python objects.
(cherry picked from commit 66bca38)

…d int (pythonGH-143084)

When comparing negative non-integer float and int with the same number
of bits in the integer part, __neg__() in the int subclass returning
not an int caused an assertion error.

Now the integer is no longer negated. Also, reduced the number of
temporary created Python objects.
(cherry picked from commit 66bca38)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) January 9, 2026 17:21
@serhiy-storchaka serhiy-storchaka merged commit 618a424 into python:3.13 Jan 9, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant