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 AllanDaemon
Recipients AllanDaemon, docs@python
Date 2020-09-14.07:06:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org>
In-reply-to
Content
The implementation of PEP 585 in 3.9 adds some new attributes, but they aren't listed with dir() (then, not list in autocomplete and IntelliSense).

Python 3.9.0rc1+ (heads/3.9:d7cd1164c1, Aug 25 2020, 17:27:09)

>>> li = list[int]
>>> li.__origin__
<class 'list'>
>>> getattr(li, '__origin__')
<class 'list'>
>>> '__origin__' in dir(li)
False

That applies to:

__origin__
__args__
__parameters__

It seems to be not the expected behaviour, so this bug report. If this is not the case, some piece of documentation could be interesting. Also, I couldn't find anything about Generic Alias in the documentation, only in the source code. Should this be addressed too?
History
Date User Action Args
2020-09-14 07:06:06AllanDaemonsetrecipients: + AllanDaemon, docs@python
2020-09-14 07:06:06AllanDaemonsetmessageid: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org>
2020-09-14 07:06:06AllanDaemonlinkissue41780 messages
2020-09-14 07:06:05AllanDaemoncreate