summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-01-24 20:05:12 (GMT)
committerGitHub <noreply@github.com>2024-01-24 20:05:12 (GMT)
commitd7d3690af7db0744bb6d93435cd7cd3d815105dc (patch)
tree9dc627213cc8173401cb09c2cd738ba202a29b6f /Doc
parent94c5567e912dee2c55b55b96a3199e0dd5a46040 (diff)
downloadcpython-d7d3690af7db0744bb6d93435cd7cd3d815105dc.zip
cpython-d7d3690af7db0744bb6d93435cd7cd3d815105dc.tar.gz
cpython-d7d3690af7db0744bb6d93435cd7cd3d815105dc.tar.bz2
[3.11] gh-108731: Add description of __slots__ to MemberDescriptorType docs (GH-108745) (GH-114537)
(cherry picked from commit 6888cccac0776d965cc38a7240e1bdbacb952b91) Co-authored-by: plokmijnuhby <39633434+plokmijnuhby@users.noreply.github.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/types.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index da10cf1..4f468da 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -356,6 +356,10 @@ Standard names are defined for the following types:
data members which use standard conversion functions; it has the same purpose
as the :class:`property` type, but for classes defined in extension modules.
+ In addition, when a class is defined with a :attr:`~object.__slots__` attribute, then for
+ each slot, an instance of :class:`!MemberDescriptorType` will be added as an attribute
+ on the class. This allows the slot to appear in the class's :attr:`~object.__dict__`.
+
.. impl-detail::
In other implementations of Python, this type may be identical to