Datasets:
Download Python/train/3.13/param-spec/legacy_02.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 358 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/param-spec/legacy_02.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/train/3.13/param-spec/legacy_02.py
-
curl -L -o legacy_02.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/param-spec/legacy_02.py
358 Bytes
| class Request: | |
| ... | |
| def with_request(f: Callable[..., R]) -> Callable[..., R]: | |
| def inner(*args: object, **kwargs: object) -> R: | |
| return f(Request(), *args, **kwargs) | |
| return inner | |
| def takes_int_str(request: Request, x: int, y: str) -> int: | |
| # use request | |
| return x + 7 | |
| takes_int_str(1, "A") | |
| takes_int_str("B", 2) # fails at runtime | |