[issue44524] __name__ attribute in typing module

Serhiy Storchaka report at bugs.python.org
Thu Aug 5 12:42:15 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I am confusing. Why do these objects should have __name__ and __qualname__ attributes? What document specifies this? How are these attributes used?

collections.abc.MutableSet and typing.MutableSet are different things. The former is a class, the latter is not a class. I don't know exact reasons, but it was intentional. We introduced __mro_entries__ for this (it was significant intervention in class creation mechanism).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44524>
_______________________________________


More information about the Python-bugs-list mailing list