Use of TypeVar(... bound=Example) vs Type[Example] #8
Labels
discussion
Further information is required or should be discussed
help wanted
Extra attention is needed
From the Python documentation it is clear that using
TypeVar(... bound=Example)
will constraint the type to a subclass ofExample
.What is unclear is how:
Is different from:
Is there any reason to prefer one over the other? and what are the consequences of these differences?
The text was updated successfully, but these errors were encountered: