This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BTaskaya
Recipients AllanDaemon, BTaskaya, docs@python, gvanrossum
Date 2020-09-15.14:19:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Okay, so IIRC if we stop forwarding __class__ (add it as an exception to attr_exceptions) it would return us the original dir(), and also solve the inconsistency of the example you gave;

> >>> list.__class__
> <class 'type'>
> >>> list[int].__class__
> <class 'type'>
> >>> type(list)
> <class 'type'>
> >>> type(list[int])
> <class 'types.GenericAlias'>

but the problem is that, it is not 'exactly' complying with the specs at PEP 585. I am aware that we already added some extras to this list ( like __mro_entries__ etc, but __class__ looks like a tricky problem. @gvanrossum any comments?
Date User Action Args
2020-09-15 14:19:52BTaskayasetrecipients: + BTaskaya, gvanrossum, docs@python, AllanDaemon
2020-09-15 14:19:52BTaskayasetmessageid: <>
2020-09-15 14:19:52BTaskayalinkissue41780 messages
2020-09-15 14:19:52BTaskayacreate