Batuhan Taskaya <isidenti...@gmail.com> added the comment:
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 (https://www.python.org/dev/peps/pep-0585/#parameters-to-generics-are-available-at-runtime) like __mro_entries__ etc, but __class__ looks like a tricky problem. @gvanrossum any comments? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41780> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com