Skip to content

[3.11] gh-108731: Add description of __slots__ to MemberDescriptorType docs (GH-108745) #114537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/library/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down