Skip to content

gh-62912: fix pure-Python operator.index()#148023

Closed
skirpichev wants to merge 2 commits into
python:mainfrom
skirpichev:pyoperator.index/62912
Closed

gh-62912: fix pure-Python operator.index()#148023
skirpichev wants to merge 2 commits into
python:mainfrom
skirpichev:pyoperator.index/62912

Conversation

@skirpichev

@skirpichev skirpichev commented Apr 2, 2026

Copy link
Copy Markdown
Member

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@skirpichev

Copy link
Copy Markdown
Member Author

CC @serhiy-storchaka

This is based on your patch, especially tests. But I believe that this simplified version is now ok. Strictly speaking, new docs lie for some broken int's subclasses like:

class BadInt(int):
    def __index__(self):
        return 42

We need to fix also concat/iconcat. But I would prefer to do this in a separate PR.

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 9, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33551196 | 📁 Comparing 54eb48b against main (dd2faeb)

  🔍 Preview build  

2 files changed
± library/operator.html
± whatsnew/changelog.html

@skirpichev skirpichev closed this Jul 12, 2026
@skirpichev skirpichev deleted the pyoperator.index/62912 branch July 12, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant