[issue40663] Wrong generated annotation on subscripting

Batuhan Taskaya report at bugs.python.org
Sun May 17 13:41:52 EDT 2020


Batuhan Taskaya <isidentical at gmail.com> added the comment:

$ python3.8
Python 3.8.0+ (heads/3.8:b9e5547f58, Nov 28 2019, 19:18:03) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> b: Type[(int, str, *types)]
>>> __annotations__
{'b': 'Type[int, str, *types]'}

 $ python3.7
Python 3.7.5 (default, Apr 19 2020, 20:18:17) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> b: Type[(int, str, *types)]
>>> __annotations__
{'b': 'Type[int, str, *types]'}
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40663>
_______________________________________


More information about the Python-bugs-list mailing list