Download Python/train/3.8/protocol/modern_12.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 292 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.8/protocol/modern_12.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/train/3.8/protocol/modern_12.py
-
curl -L -o modern_12.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.8/protocol/modern_12.py
292 Bytes
| C = TypeVar('C', bound='Copyable') | |
| class Copyable(Protocol): | |
| def copy(self: C) -> C: | |
| ... | |
| class One: | |
| def copy(self) -> 'One': | |
| ... | |
| T = TypeVar('T', bound='Other') | |
| class Other: | |
| def copy(self: T) -> T: | |
| ... | |
| c: Copyable | |
| c = One() # OK | |
| c = Other() # Also OK | |