Skip to content
Snippets Groups Projects
Unverified Commit 219696ab authored by Petr Viktorin's avatar Petr Viktorin Committed by GitHub
Browse files

gh-99249: Clarify "read-only" slots tp_bases & tp_mro (GH-99342)


These slots are marked "should be treated as read-only" in the
table at the start of the document.  That doesn't say anything about
setting them in the static struct.

`tp_bases` docs did say that it should be ``NULL`` (TIL!). If you
ignore that, seemingly nothing bad happens. However, some slots
may not be inherited, depending on which sub-slot structs are present.
(FWIW, NumPy sets tp_bases and is affected by the quirk -- though to
be fair, its DUAL_INHERIT code probably predates tp_bases docs, and
also the result happens to be benign.)

This patch makes things explicit.
It also makes the summary table legend easier to scan.

Co-authored-by: default avatarKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
parent 594de165
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment