]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)
authorPablo Galindo <Pablogsal@gmail.com>
Wed, 7 Jul 2021 13:20:49 +0000 (14:20 +0100)
committerGitHub <noreply@github.com>
Wed, 7 Jul 2021 13:20:49 +0000 (14:20 +0100)
Doc/library/inspect.rst
Doc/reference/datamodel.rst

index 1d7572e56410f2b6ec17e0f9164e5a5b61c971a5..ed95c72c9a626d7332fa0201adb650d37101d910 100644 (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                 |
 +-----------+-------------------+---------------------------+
index 2f8ed70e53c7359d170c3092f06805fd0b61c4a5..b6dae810d781b7bf2e9a3769cbfb7ab950eea0f7 100644 (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