[Python-checkins] bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)

pablogsal webhook-mailer at python.org
Wed Jul 7 09:21:15 EDT 2021


https://github.com/python/cpython/commit/8363c53369a582ff9ae4e797a80cdce12624a278
commit: 8363c53369a582ff9ae4e797a80cdce12624a278
branch: main
author: Pablo Galindo <Pablogsal at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2021-07-07T14:20:49+01:00
summary:

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

files:
M Doc/library/inspect.rst
M Doc/reference/datamodel.rst

diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 1d7572e56410f2..ed95c72c9a626d 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -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                 |
 +-----------+-------------------+---------------------------+
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 2f8ed70e53c735..b6dae810d781b7 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -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



More information about the Python-checkins mailing list