Why are single type constraints disallowed in Python?

后端 未结 0 1174
滥情空心
滥情空心 2021-02-12 04:46

Suppose you want to constrain a type variable to implement a certain interface. You might write something like so:

from typing import TypeVar, Callable

T = Type         


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