2 ms·
No, in this particular example, there's no real advantage. What I meant were situations where the TypeVar gets a little more complicated, compare the additional
by codethief 5y ago
No, in this particular example, there's no real advantage. What I meant were situations where the TypeVar gets a little more complicated, compare the additional parameters on https://docs.python.org/3/library/typing.html#typing.TypeVar https://docs.python.org/3/library/typing.html#typing.TypeVar . Then importing TypeVars starts to pay off because you only have to define your bounds etc. once.
- throwaway894345 5y agoAh, that makes sense. Thanks for clarifying.