Datasets:
Download Python/val/3.13/variadic-generics/modern_04.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 293 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/val/3.13/variadic-generics/modern_04.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/val/3.13/variadic-generics/modern_04.py
-
curl -L -o modern_04.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/val/3.13/variadic-generics/modern_04.py
293 Bytes
| # parse_options: {"target-version": "3.10"} | |
| lst[*index] # simple index | |
| class Array(Generic[DType, *Shape]): ... # motivating example from the PEP | |
| lst[a, *b, c] # different positions | |
| lst[a, b, *c] # different positions | |
| lst[*a, *b] # multiple unpacks | |
| array[3:5, *idxs] # mixed with slices | |