-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
base: main
Are you sure you want to change the base?
Conversation
peps/pep-0800.rst
Outdated
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this look?
peps/pep-0800.rst
Outdated
|
||
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>`__. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erroneous whitespace change?
There was a problem hiding this comment.
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?
📚 Documentation preview 📚: https://pep-previews--4540.org.readthedocs.build/