GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — gh-148639: Implement PEP 800 (typing.disjoint_base) by JelleZijlstra · Pull Request #148640 · python/cpython Conversation
|
| """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. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think we need to say "parent or child" here, not just "parent", similar to the documentation wording.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think we either need a double colon here or a .. testcode:: directive, for this example to render properly?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good call, double colon works
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
) Co-authored-by: Victorien <[email protected]> Co-authored-by: Petr Viktorin <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.