Skip to content

Commit 6a26b06

Browse files
authored
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.
1 parent 6acaf65 commit 6a26b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/typing.rst

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

18111811
T = TypeVar('T') # Can be anything
1812-
S = TypeVar('S', bound=str) # Can be any subtype of str
1812+
S = TypeVar('S', bound=str) # Can be str or any subtype of str
18131813
A = TypeVar('A', str, bytes) # Must be exactly str or bytes
18141814

18151815
Type variables exist primarily for the benefit of static type

0 commit comments

Comments
 (0)