New submission from Bozhi You <youbo...@cs.utexas.edu>:

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 <module>
    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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to