PEP 3155 – Qualified name for classes and functions
This PEP proposes the addition of a __qualname__ attribute to functions and classes.
For top-level functions and classes, the __qualname__ attribute is equal to the __name__ attribute.
For nested classes, methods, and nested functions, the __qualname__ attribute contains a dotted path leading to the object from the module top-level.
A function’s local namespace is represented in that dotted path by a component named <locals>.
__qualname__