Runtime Data Attributes
function.__qualname__
Lexically qualified name, including enclosing definitions. It is not necessarily an importable dotted path, especially for nested functions.
Formal Syntax & Structure
python syntaxpython
f.__qualname__Return Value
str
Value exposed by this attribute; availability and mutability depend on the owner as described.
Working Example
Example Snippetpython
def outer(): def inner(): pass return innerf = outer()print(f.__qualname__)