summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2022-11-28 08:22:08 (GMT)
committerGitHub <noreply@github.com>2022-11-28 08:22:08 (GMT)
commit219696abb240607d3f807853c4c180825e60716e (patch)
tree9ac158219c63c06ff6002098a67b6050a6fa1e08 /Python/bytecodes.c
parent594de165bf2f21d6b28eb17003ea78fc20c0ffed (diff)
downloadcpython-219696abb240607d3f807853c4c180825e60716e.zip
cpython-219696abb240607d3f807853c4c180825e60716e.tar.gz
cpython-219696abb240607d3f807853c4c180825e60716e.tar.bz2
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: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Python/bytecodes.c')
0 files changed, 0 insertions, 0 deletions