Files
example-code-2e/13-protocol-abc/typing/randompickload.py
2021-02-14 20:58:46 -03:00

7 lines
233 B
Python

from typing import Protocol, runtime_checkable, Any, Iterable
from randompick import RandomPicker
@runtime_checkable # <1>
class LoadableRandomPicker(RandomPicker, Protocol): # <2>
def load(self, Iterable) -> None: ... # <3>