[Python-ideas] PEP 3155 - Qualified name for classes and functions
MRAB
python at mrabarnett.plus.com
Sun Oct 30 00:47:38 CEST 2011
On 29/10/2011 23:18, Antoine Pitrou wrote:
> Proposal
> ========
>
> This PEP proposes the addition of a ``__qname__`` attribute to functions
> and classes. For top-level functions and classes, the ``__qname__``
> attribute is equal to the ``__name__`` attribute. For nested classed,
> methods, and nested functions, the ``__qname__`` attribute contains a
> dotted path leading to the object from the module top-level.
>
> The repr() and str() of functions and classes is modified to use ``__qname__``
> rather than ``__name__``.
>
[snip]
The only criticism I have is that I think I'd prefer it if it were
called something more like "__qualname__".
More information about the Python-ideas
mailing list