Skip to content

PEP 800: Rename to "disjoint base" #4540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Aug 10, 2025


📚 Documentation preview 📚: https://pep-previews--4540.org.readthedocs.build/

Comment on lines 67 to 70
This PEP proposes an extension to the type system that makes it possible to express when multiple inheritance is not
allowed at runtime: an ``@solid_base`` decorator that marks classes as "solid bases".
allowed at runtime: an ``@disjoint_base`` decorator that marks a classes as a *disjoint base*, the term we introduce
in preference to the term "solid base".
This gives type checkers a more precise understanding of reachability, and helps in several concrete areas.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The introduction of the phrase 'solid base' is now by reference to Ty in the previous para, where I think it's slightly unclear if 'solid base' comes from Ty or CPython. Perhaps that paragraph could be rephrased to avoid 'solid', or there could be slightly more of a pointer to the CPython history?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this look?


Runtime restrictions on multiple inheritance
--------------------------------------------

While Python generally allows multiple inheritance, the runtime imposes various restrictions, as documented in
`CPython PR 136844 <https://github.com/python/cpython/pull/136844/files>`__ (hopefully soon to be merged).
`CPython <https://docs.python.org/3.15/reference/compound_stmts.html#multiple-inheritance>`__.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use a proper cross-reference here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only in the 3.15 docs, so not sure that would work yet?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a py3.15 to the intersphinx_mapping in peps/conf.py and then use a :external+py3.15:etc reference.

@@ -348,7 +362,6 @@ Reference Implementation

None yet.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erroneous whitespace change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters for the rendered output?

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.

3 participants