From c8c872c5125e7c6375d6fe46b478276230a76431 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 9 Jul 2020 14:51:09 -0700 Subject: [PATCH] PEP 622: Fix example in static checks Fixes #1516 --- pep-0622.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep-0622.rst b/pep-0622.rst index 45a849aeb..185205552 100644 --- a/pep-0622.rst +++ b/pep-0622.rst @@ -990,10 +990,10 @@ expression with a union type:: def classify(val: Union[int, Tuple[int, int], List[int]]) -> str: match val: - case [x, *other]: - return f"A sequence starting with {x}" case [x, y] if x > 0 and y > 0: return f"A pair of {x} and {y}" + case [x, *other]: + return f"A sequence starting with {x}" case int(): return f"Some integer" # Type-checking error: some cases unhandled.