summaryrefslogtreecommitdiffstats
path: root/Python/future.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-11-28 11:25:04 (GMT)
committerGitHub <noreply@github.com>2022-11-28 11:25:04 (GMT)
commit5dce4ab736e76bedd6ec0615c0920a059bf5d13c (patch)
tree93b8e433c1a9aa628ec0197b8873a29330266567 /Python/future.c
parent6f658dd60dc759b5cb146f321bff06a8417abaf4 (diff)
downloadcpython-5dce4ab736e76bedd6ec0615c0920a059bf5d13c.zip
cpython-5dce4ab736e76bedd6ec0615c0920a059bf5d13c.tar.gz
cpython-5dce4ab736e76bedd6ec0615c0920a059bf5d13c.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. (cherry picked from commit 219696abb240607d3f807853c4c180825e60716e) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Python/future.c')
0 files changed, 0 insertions, 0 deletions