gh-111696, PEP 737: Add PyType_GetFullyQualifiedName() function (#116815)

Rewrite tests on type names in Python, they were written in C.
This commit is contained in:
Victor Stinner 2024-03-14 17:19:36 +01:00 committed by GitHub
parent b54d7c87aa
commit 19c3a2ff91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 161 additions and 94 deletions

View file

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