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 Smile-zjk
Recipients Smile-zjk, docs@python
Date 2021-01-12.14:43:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I learned about type aliases on the page(, and I found that following the code (Vector = list[float])in the tutorial, an error occurred (NameError: name 'typing' is not defined) when running.

The following code has the same problem:
  ConnectionOptions = dict[str, str]
  Address = tuple[str, int]
  Server = tuple[Address, ConnectionOptions]

I searched through google and found the correct code:
  from typing import List
  Vector = List[float]

  from typing import Dict, Tuple, Sequence
  ConnectionOptions = Dict[str, str]
  Address = Tuple[str, int]
  Server = Tuple[Address, ConnectionOptions]
Date User Action Args
2021-01-12 14:43:59Smile-zjksetrecipients: + Smile-zjk, docs@python
2021-01-12 14:43:59Smile-zjksetmessageid: <>
2021-01-12 14:43:59Smile-zjklinkissue42910 messages
2021-01-12 14:43:59Smile-zjkcreate