Why are single type constraints disallowed in Python?

后端 未结 0 1070
梦谈多话
梦谈多话 2021-02-12 05:06

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         


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