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 solution to this may be replacing `list` with `List` from `typing`.
--
assignee: docs@python
components: Documentation
messages: 404232
nosy: bozhiyou, docs@python
priority: normal
severity: normal
status: open
title: Invalid example for typing
type: compile error
versions: Python 3.10
___
Python tracker
<https://bugs.python.org/issue45518>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com