Documentation
*Notes:
For T and A, what type is accepted is clearly explained in the example of typing.TypeVar while for S isn't explained clearly even though str itself is also accepted as shown below:
T = TypeVar('T') # Can be anything
S = TypeVar('S', bound=str) # Can be any subtype of str <- Here
A = TypeVar('A', str, bytes) # Must be exactly str or bytes
So, S should be explained more clearly as shown below:
S = TypeVar('S', bound=str) # Can be str or any subtype of str
Linked PRs
Documentation
*Notes:
For
TandA, what type is accepted is clearly explained in the example of typing.TypeVar while forSisn't explained clearly even thoughstritself is also accepted as shown below:So,
Sshould be explained more clearly as shown below:Linked PRs