Datasets:
Download Python/train/3.13/param-spec/modern_05.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/param-spec/modern_05.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/train/3.13/param-spec/modern_05.py
-
curl -L -o modern_05.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/param-spec/modern_05.py
415 Bytes
| T = TypeVar("T") | |
| P_2 = ParamSpec("P_2") | |
| class X(Generic[T, P]): | |
| f: Callable[P, int] | |
| x: T | |
| def f(x: X[int, P_2]) -> str: ... # Accepted | |
| def f(x: X[int, Concatenate[int, P_2]]) -> str: ... # Accepted | |
| def f(x: X[int, [int, bool]]) -> str: ... # Accepted | |
| def f(x: X[int, ...]) -> str: ... # Accepted | |
| def f(x: X[int, int]) -> str: ... # Rejected | |