Uh oh!
There was an error while loading. Please reload this page.
gh-148639: Implement PEP 800 (typing.disjoint_base) - #148640
Merged
Merged
Conversation
JelleZijlstra
requested review from
AA-Turner, AlexWaygood and willingc
as code ownersApril 16, 2026 03:09
Viicos
reviewed
Apr 16, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
encukou
reviewed
Apr 16, 2026
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
carljm
approved these changes
Apr 17, 2026
| """This decorator marks a class as a disjoint base. | ||
| Child classes of a disjoint base cannot inherit from other disjoint bases that are | ||
| not parent classes of the disjoint base. |
Member
There was a problem hiding this comment.
I think we need to say "parent or child" here, not just "parent", similar to the documentation wording.
| Type checkers do not allow child classes of a disjoint base ``C`` to | ||
| inherit from other disjoint bases that are not parent or child classes of ``C``. | ||
| For example: |
Member
There was a problem hiding this comment.
I think we either need a double colon here or a .. testcode:: directive, for this example to render properly?
MemberAuthor
There was a problem hiding this comment.
Good call, double colon works
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Documentation preview 📚: https://cpython-previews--148640.org.readthedocs.build/