Skip to content

Commit 1123150

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 f09a318 commit 1123150

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
@@ -1781,7 +1781,7 @@ without the dedicated syntax, as documented below.
17811781
However, if desired, reusable type variables can also be constructed manually, like so::
17821782

17831783
T = TypeVar('T') # Can be anything
1784-
S = TypeVar('S', bound=str) # Can be any subtype of str
1784+
S = TypeVar('S', bound=str) # Can be str or any subtype of str (including str itself)
17851785
A = TypeVar('A', str, bytes) # Must be exactly str or bytes
17861786

17871787
Type variables exist primarily for the benefit of static type

0 commit comments

Comments
 (0)