General way to check if TypeVar on Python

后端 未结 0 442
滥情空心
滥情空心 2020-11-30 23:20

I check if a variable is TypeVar with below method:

hasattr(variable, \'__bound__\')

But It is not better way I think. I would like to know i

相关标签:
回答
  • 消灭零回复
提交回复
热议问题