[issue45518] Invalid example for typing

2021-11-17 Thread Bozhi You
Bozhi You added the comment: My bad. Didn't notice the version constraint. Thank you, Logan! -- stage: -> resolved status: pending -> closed ___ Python tracker ___

[issue45518] Invalid example for typing

2021-10-22 Thread Éric Araujo
Change by Éric Araujo : -- resolution: -> not a bug status: open -> pending type: compile error -> behavior ___ Python tracker ___

[issue45518] Invalid example for typing

2021-10-18 Thread Logan Jones
Logan Jones added the comment: Hi Bozhi. The syntax that you're referencing was added in 3.9. So if you're trying the syntax in earlier versions of Python, it won't work. The standard collections were added in PEP 585 (https://www.python.org/dev/peps/pep-0585/) I think the reason the

[issue45518] Invalid example for typing

2021-10-18 Thread Bozhi You
New submission from Bozhi You : The first example snippet under https://docs.python.org/3/library/typing.html#type-aliases is invalid to run. ``` Traceback (most recent call last): File "main.py", line 1, in Vector = list[float] TypeError: 'type' object is not subscriptable ``` A