[3.13] gh-66646: Explain __base__ attribute in the docs (GH-102554) (GH-140366)

(cherry picked from commit faa169afa0)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Éric <merwok@netwok.org>
This commit is contained in:
Miss Islington (bot) 2025-10-21 09:06:56 +02:00 committed by GitHub
parent 9084371107
commit 677a488e04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1158,6 +1158,7 @@ Special attributes
single: __module__ (class attribute)
single: __dict__ (class attribute)
single: __bases__ (class attribute)
single: __base__ (class attribute)
single: __doc__ (class attribute)
single: __annotations__ (class attribute)
single: __type_params__ (class attribute)
@ -1191,6 +1192,13 @@ Special attributes
In most cases, for a class defined as ``class X(A, B, C)``,
``X.__bases__`` will be exactly equal to ``(A, B, C)``.
* - .. attribute:: type.__base__
- .. impl-detail::
The single base class in the inheritance chain that is responsible
for the memory layout of instances. This attribute corresponds to
:c:member:`~PyTypeObject.tp_base` at the C level.
* - .. attribute:: type.__doc__
- The class's documentation string, or ``None`` if undefined.
Not inherited by subclasses.