bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)

This commit is contained in:
Pablo Galindo 2021-07-07 14:20:49 +01:00 committed by GitHub
parent 2f180ce2cb
commit 8363c53369
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -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 |
+-----------+-------------------+---------------------------+

View file

@ -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