Skip to content

Commit

Permalink
bpo-44530: Document the new CodeObject.co_qualname attribute (pythonG…
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal authored Jul 7, 2021
1 parent 2f180ce commit 8363c53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ attributes:
| | co_name | name with which this code |
| | | object was defined |
+-----------+-------------------+---------------------------+
| | co_qualname | fully-qualified name with |
| | | which this code object |
| | | was defined |
+-----------+-------------------+---------------------------+
| | co_names | tuple of names of local |
| | | variables |
+-----------+-------------------+---------------------------+
Expand Down
2 changes: 2 additions & 0 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,10 @@ Internal types
single: co_varnames (code object attribute)
single: co_cellvars (code object attribute)
single: co_freevars (code object attribute)
single: co_qualname (code object attribute)

Special read-only attributes: :attr:`co_name` gives the function name;
:attr:`co_qualname` gives the fully qualified function name;
:attr:`co_argcount` is the total number of positional arguments
(including positional-only arguments and arguments with default values);
:attr:`co_posonlyargcount` is the number of positional-only arguments
Expand Down

0 comments on commit 8363c53

Please sign in to comment.