Skip to content

Commit 4bc477f

Browse files
committed
gh-142958: add missing document for __function__
1 parent 610aabf commit 4bc477f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Doc/library/inspect.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,27 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
113113
| | | <type-params>` of |
114114
| | | a generic function |
115115
+-----------------+-------------------+---------------------------+
116+
| | __closure__ | Contains the cells that |
117+
| | | store values for free |
118+
| | | variables (variables from |
119+
| | | outer scopes) used in |
120+
| | | nested functions. |
121+
| | | Essential for |
122+
| | | understanding how closures|
123+
| | | work in Python. |
124+
+-----------------+-------------------+---------------------------+
125+
| | __dict__ | The namespace dictionary |
126+
| | | that stores arbitrary |
127+
| | | function attributes |
128+
| | | and metadata. |
129+
+-----------------+-------------------+---------------------------+
130+
| | __annotate__ | The annotate function for |
131+
| | |lazy evaluation of |
132+
| | | annotations (PEP649), or |
133+
| | | None if the function has |
134+
| | | no annotations. New in |
135+
| | |Python 3.14. |
136+
+-----------------+-------------------+---------------------------+
116137
| | __module__ | name of module in which |
117138
| | | this function was defined |
118139
+-----------------+-------------------+---------------------------+

0 commit comments

Comments
 (0)