2

I have a use case for accepting type hints as arguments to a function. But what is the right type hint to to accept a type hint?

T = TypeVar('T', bound='TypeHintType')

def register_handler(type_hint: T, handler: Handler[T]) -> None:
    ...

Is there a "TypeHintType" that I can use to annotate that a type hint is expected as an argument?

4

0 回答 0