From 6a26b0686b73640805c3cb0898525d1b1e719614 Mon Sep 17 00:00:00 2001 From: "Kai (Kazuya Ito)" Date: Thu, 5 Mar 2026 13:06:12 +0900 Subject: [PATCH] Update comment for TypeVar S in typing.rst Clarified the comment for type variable S to specify it can be str or any subtype of str. --- Doc/library/typing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 09e9103e1b80d0..c707d53d14bf19 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1809,7 +1809,7 @@ without the dedicated syntax, as documented below. However, if desired, reusable type variables can also be constructed manually, like so:: T = TypeVar('T') # Can be anything - S = TypeVar('S', bound=str) # Can be any subtype of str + S = TypeVar('S', bound=str) # Can be str or any subtype of str A = TypeVar('A', str, bytes) # Must be exactly str or bytes Type variables exist primarily for the benefit of static type