Skip to content

Commit af047f2

Browse files
gh-145524: Update comment for TypeVar S in typing.rst (#145525)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent d88a6b9 commit af047f2

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

18121812
T = TypeVar('T') # Can be anything
1813-
S = TypeVar('S', bound=str) # Can be any subtype of str
1813+
S = TypeVar('S', bound=str) # Can be str or any subtype of str (including str itself)
18141814
A = TypeVar('A', str, bytes) # Must be exactly str or bytes
18151815

18161816
Type variables exist primarily for the benefit of static type

0 commit comments

Comments
 (0)