[Python-ideas] PEP 3155 - Qualified name for classes and functions

Nikolaus Rath Nikolaus at rath.org
Sun Oct 30 21:41:42 CET 2011


Antoine Pitrou <solipsis-xNDA5Wrcr86sTnJN9+BGXg at public.gmane.org> writes:
> 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.

Did you consider making it an array of the actual class/function objects
instead of a string? It seems to me that going from the actual objects
to the string representation is much easier than having to go the other
way around.



Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C



More information about the Python-ideas mailing list