8000 [3.12] gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) by AlexWaygood · Pull Request #124558 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) #124558

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 3 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
AlexWaygood committed Sep 25, 2024
commit 7004384d1ccbfa5ec95b53540fb8994c228a6cc8
11 changes: 6 additions & 5 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1006,18 +1006,19 @@ Special attributes
* - .. attribute:: type.__annotations__
- A dictionary containing
:term:`variable annotations <variable annotation>`
collected during class body execution. See also:
:attr:`__annotations__ attributes <object.__annotations__>`.

For best practices on working with :attr:`~object.__annotations__`,
please see :ref:`annotations-howto`.
collected during class body execution. For best practices on working
with :attr:`!__annotations__`, please see :ref:`annotations-howto`.

* - .. attribute:: type.__type_params__
- A :class:`tuple` containing the :ref:`type parameters <type-params>` of
a :ref:`generic class <generic-classes>`.

.. versionadded:: 3.12

* - .. attribute:: type.__mro__
- The :class:`tuple` of classes that are considered when looking for
base classes during method resolution.


Special methods
^^^^^^^^^^^^^^^
Expand Down
Loading
0