From 11231506f23098cd45ed8d14863811dfcb01db4c Mon Sep 17 00:00:00 2001 From: "Kai (Kazuya Ito)" Date: Sat, 28 Nov 2026 12:41:23 +0900 Subject: [PATCH] gh-145524: Update comment for TypeVar S in typing.rst (GH-145525) (cherry picked from commit af047f2fc5c4f330931f99dfab3345597ba372c5) Co-authored-by: Kai (Kazuya Ito) Co-authored-by: Jelle Zijlstra --- 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 477536fcd3348f..2c292a2ec3afc1 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1781,7 +1781,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 (including str itself) A = TypeVar('A', str, bytes) # Must be exactly str or bytes Type variables exist primarily for the benefit of static type