Skip to content

Use direct operator methods in _compare_compatible#1100

Merged
notatallshaw merged 1 commit intopypa:mainfrom
notatallshaw:use-direct-operator-method-when-known
Feb 28, 2026
Merged

Use direct operator methods in _compare_compatible#1100
notatallshaw merged 1 commit intopypa:mainfrom
notatallshaw:use-direct-operator-method-when-known

Conversation

@notatallshaw
Copy link
Copy Markdown
Member

@notatallshaw notatallshaw commented Feb 28, 2026

We already use direct operator method calls in other places now, this makes it easier to navigate the code using coding tools as you can jump directly to the intended method.

And in theory should be slight faster, as you don't have to go via another function to get the correct method, but I have not benchmarked it and I imagine it would be marginal.

I have added additional parenthesis to preserve the method calls on a single line, otherwise formatting breaks them up.

@notatallshaw notatallshaw merged commit c7e3ec1 into pypa:main Feb 28, 2026
50 checks passed
ngoldbaum pushed a commit to ngoldbaum/packaging that referenced this pull request Apr 1, 2026
This was referenced Apr 13, 2026
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.

2 participants