Download Python/train/3.13/exception-groups/modern_15.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/exception-groups/modern_15.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/train/3.13/exception-groups/modern_15.py
-
curl -L -o modern_15.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/exception-groups/modern_15.py
501 Bytes
| try: | |
| try: | |
| raise ExceptionGroup( | |
| "eg", | |
| [ | |
| ValueError(1), | |
| TypeError(2), | |
| OSError(3), | |
| ExceptionGroup( | |
| "nested", | |
| [OSError(4), TypeError(5), ValueError(6)]) | |
| ] | |
| ) | |
| except* ValueError as e: | |
| print(f'*ValueError: {e!r}') | |
| raise | |
| except* OSError as e: | |
| print(f'*OSError: {e!r}') | |
| except ExceptionGroup as e: | |
| print(repr(e)) | |