Skip to content

Override __int__ and __index__ for bool in builtins.pyi#16067

Open
jonathandung wants to merge 1 commit into
python:mainfrom
jonathandung:patch-6
Open

Override __int__ and __index__ for bool in builtins.pyi#16067
jonathandung wants to merge 1 commit into
python:mainfrom
jonathandung:patch-6

Conversation

@jonathandung

Copy link
Copy Markdown
Contributor

Such that the fact that they only return 1 for True and 0 for False may be represented without violating the Liskov Substitution Principle.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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