What is
__qualname__
in python and how is it useful?Why would I need to use it over
__name__
?
I read the docs, but they didn't help me get a clear understanding on it's usefulness.
I have read Get fully qualified name of a Python class (Python 3.3+).
That question asks "how to get a qualified name", which presumes that one knows the meaning of "qualified name". Obviously, the answer to that question is to use the __qualname__
attribute.
My question asks what __qualname__
is, and why should I use it over __name__
.
__qualname__
is and how it is used, not How do I get the fully qualified name... – UndeniableYou are looking for __qualname__ (introduced in Python 3.3):
– Undeniable__qualname__
is. – Undeniable