Skip to content

Commit 609e954

Browse files
hyperkaiJelleZijlstra
authored andcommitted
gh-145524: Update comment for TypeVar S in typing.rst (GH-145525)
(cherry picked from commit af047f2) Co-authored-by: Kai (Kazuya Ito) <kazya.ito.dream@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent cf31c24 commit 609e954

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Doc/library/typing.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ without the dedicated syntax, as documented below.
17731773
However, if desired, reusable type variables can also be constructed manually, like so::
17741774

17751775
T = TypeVar('T') # Can be anything
1776-
S = TypeVar('S', bound=str) # Can be any subtype of str
1776+
S = TypeVar('S', bound=str) # Can be str or any subtype of str (including str itself)
17771777
A = TypeVar('A', str, bytes) # Must be exactly str or bytes
17781778

17791779
Type variables exist primarily for the benefit of static type

0 commit comments

Comments
 (0)