summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst10
1 files changed, 3 insertions, 7 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 7be755e..9fdbdb1 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -1084,19 +1084,15 @@ Glossary
Type aliases are useful for simplifying :term:`type hints <type hint>`.
For example::
- from typing import List, Tuple
-
def remove_gray_shades(
- colors: List[Tuple[int, int, int]]) -> List[Tuple[int, int, int]]:
+ colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:
pass
could be made more readable like this::
- from typing import List, Tuple
-
- Color = Tuple[int, int, int]
+ Color = tuple[int, int, int]
- def remove_gray_shades(colors: List[Color]) -> List[Color]:
+ def remove_gray_shades(colors: list[Color]) -> list[Color]:
pass
See :mod:`typing` and :pep:`484`, which describe this functionality.