mirror of
https://github.com/python/cpython.git
synced 2026-01-09 08:52:34 +00:00
[3.11] gh-108731: Add description of __slots__ to MemberDescriptorType docs (GH-108745) (GH-114537)
(cherry picked from commit 6888cccac0)
Co-authored-by: plokmijnuhby <39633434+plokmijnuhby@users.noreply.github.com>
This commit is contained in:
parent
94c5567e91
commit
d7d3690af7
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue