[Python-Dev] Committing PEP 3155

Antoine Pitrou solipsis at pitrou.net
Sat Nov 19 10:49:31 CET 2011

On Sat, 19 Nov 2011 03:31:09 +0100
Victor Stinner <victor.stinner at haypocalc.com> wrote:
> > I haven't seen any strong objections, so I would like to go ahead and
> > commit PEP 3155 (*) soon. Is anyone against it?
> I'm not against it, but I have some questions.
> Does you a working implementing?

I suppose the question is about a working implementation :)

> Do you have a patch for issue #9276 using __qualname__? Maybe not a 
> fully working patch, but a proof-of-concept?

No. That's part of PEP 3154.

> Could you add examples on instances? I suppose that it gives the same 
> result than classes:
>    C.__qualname__ == C().__qualname__
>    C.f.__qualname__ == C().f.__qualname__

No. You have to use C().__class__.__qualname__.
Same as C().__class__.__name__, really.

> Le 19/11/2011 00:15, Barry Warsaw a écrit :
>  > I'd like the PEP to explain why this is a better solution than
>  > re-establishing introspectability that was available through
>  > unbound methods.
> __qualname__ works also on nested functions. Is it a new feature? Or was 
> it already possible in Python 2 to compute the qualified name?

It's a new feature indeed.



More information about the Python-Dev mailing list