summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-03-14 16:19:36 (GMT)
committerGitHub <noreply@github.com>2024-03-14 16:19:36 (GMT)
commit19c3a2ff91ccf7444efadbc8f7e67269060050a2 (patch)
treea6e7d0e2710d66c585c7ffe4451eee85710d8ba7 /Doc/c-api
parentb54d7c87aaf23fbd67171d0dd3e4f4ab736e6a48 (diff)
downloadcpython-19c3a2ff91ccf7444efadbc8f7e67269060050a2.zip
cpython-19c3a2ff91ccf7444efadbc8f7e67269060050a2.tar.gz
cpython-19c3a2ff91ccf7444efadbc8f7e67269060050a2.tar.bz2
gh-111696, PEP 737: Add PyType_GetFullyQualifiedName() function (#116815)
Rewrite tests on type names in Python, they were written in C.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/type.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index 5aaa814..c523423 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -185,6 +185,14 @@ Type Objects
.. versionadded:: 3.11
+.. c:function:: PyObject* PyType_GetFullyQualifiedName(PyTypeObject *type)
+
+ Return the type's fully qualified name. Equivalent to
+ ``f"{type.__module__}.{type.__qualname__}"``, or ``type.__qualname__`` if
+ ``type.__module__`` is not a string or is equal to ``"builtins"``.
+
+ .. versionadded:: 3.13
+
.. c:function:: void* PyType_GetSlot(PyTypeObject *type, int slot)
Return the function pointer stored in the given slot. If the