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 gregory.p.smith
Recipients gregory.p.smith
Date 2020-11-12.02:23:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org>
In-reply-to
Content
Python 3.7-3.10a1:
```
>>> List.__name__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/typing.py", line 760, in __getattr__
    raise AttributeError(attr)
AttributeError: __name__
>>> type(List)
<class 'typing._SpecialGenericAlias'>
>>> type(List[int])
<class 'typing._GenericAlias'>
```

Python 3.6:
```
>>> from typing import List
>>> List.__name__
'List'
>>> type(List)
<class 'typing.GenericMeta'>
>>> type(List[int])
<class 'typing.GenericMeta'>
```

Is this lack of common meta attributes intentional?  It makes the typing types unusual.

We just saw it trip up some code that was expecting everything to have a `__name__` attribute while moving beyond 3.6.  Judging by that `__getattr__` implementation it should happen on other common `__` attributes as mentioned in https://docs.python.org/3/library/stdtypes.html?highlight=__name__#special-attributes as well.
History
Date User Action Args
2020-11-12 02:23:04gregory.p.smithsetrecipients: + gregory.p.smith
2020-11-12 02:23:03gregory.p.smithsetmessageid: <1605147783.95.0.972217346071.issue42329@roundup.psfhosted.org>
2020-11-12 02:23:03gregory.p.smithlinkissue42329 messages
2020-11-12 02:23:03gregory.p.smithcreate