8 lines
191 B
Python
8 lines
191 B
Python
from typing import Protocol, runtime_checkable, TypeVar
|
|
|
|
T_co = TypeVar('T_co', covariant=True)
|
|
|
|
@runtime_checkable
|
|
class GenericRandomPicker(Protocol[T_co]):
|
|
def pick(self) -> T_co: ...
|