Download Python/train/3.13/protocol/modern_22.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 315 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/protocol/modern_22.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/train/3.13/protocol/modern_22.py
-
curl -L -o modern_22.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/protocol/modern_22.py
315 Bytes
| # callbacks.py | |
| def on_error(x: int) -> None: | |
| ... | |
| def on_success() -> None: | |
| ... | |
| # main.py | |
| import callbacks | |
| from typing import Protocol | |
| class Reporter(Protocol): | |
| def on_error(self, x: int) -> None: | |
| ... | |
| def on_success(self) -> None: | |
| ... | |
| rp: Reporter = callbacks # Passes type check | |