From ec91806268aa235432b8c4a5e538892203f6c881 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 3 Apr 2021 14:08:09 -0700 Subject: [PATCH] Allow keyword patterns for int, str etc. --- pep-0634.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep-0634.rst b/pep-0634.rst index f11564d2b71..e2007a8affc 100644 --- a/pep-0634.rst +++ b/pep-0634.rst @@ -489,7 +489,7 @@ as follows: - For a number of built-in types (specified below), a single positional subpattern is accepted which will match - the entire subject; for these types no keyword patterns are accepted. + the entire subject. (Keyword patterns work as for other types here.) - The equivalent of ``getattr(cls, "__match_args__", ()))`` is called. - If this raises an exception the exception bubbles up. - If the returned value is not a list or tuple, the conversion fails