summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-04-19 10:57:31 (GMT)
committerGitHub <noreply@github.com>2024-04-19 10:57:31 (GMT)
commit8a01fd7b9bb27c7d284e2f0152713a8619fd34a3 (patch)
treea1a2dc3f29660f562be57a08e75c8719a8aa65ce /Doc/reference
parent5d544365742a117027747306e2d4473f3b73d921 (diff)
downloadcpython-8a01fd7b9bb27c7d284e2f0152713a8619fd34a3.zip
cpython-8a01fd7b9bb27c7d284e2f0152713a8619fd34a3.tar.gz
cpython-8a01fd7b9bb27c7d284e2f0152713a8619fd34a3.tar.bz2
gh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 6d6395a..5e15583 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -970,6 +970,7 @@ A class object can be called (see above) to yield a class instance (see below).
single: __doc__ (class attribute)
single: __annotations__ (class attribute)
single: __type_params__ (class attribute)
+ single: __static_attributes__ (class attribute)
Special attributes:
@@ -1000,6 +1001,10 @@ Special attributes:
A tuple containing the :ref:`type parameters <type-params>` of
a :ref:`generic class <generic-classes>`.
+ :attr:`~class.__static_attributes__`
+ A tuple containing names of attributes of this class which are accessed
+ through ``self.X`` from any function in its body.
+
Class instances
---------------