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 BTaskaya
Date 2020-05-17.17:36:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org>
In-reply-to
Content
>>> from __future__ import annotations
>>> a: Type[int, str]
>>> b: Type[(int, str, *types)]
>>> __annotations__
{'a': 'Type[int, str]', 'b': 'Type[int, str, *types]'}
>>> ast.parse(__annotations__["b"])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/isidentical/cpython/master/Lib/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    Type[int, str, *types]
                   ^
SyntaxError: invalid syntax
History
Date User Action Args
2020-05-17 17:36:39BTaskayasetrecipients: + BTaskaya
2020-05-17 17:36:39BTaskayasetmessageid: <1589736999.01.0.252396126207.issue40663@roundup.psfhosted.org>
2020-05-17 17:36:39BTaskayalinkissue40663 messages
2020-05-17 17:36:38BTaskayacreate