Download Python/train/3.13/exception-groups/modern_22.py from SwashBuckler001/idiombench: direct link, hf CLI and curl.
- Browser
- Download file 249 Bytes
-
https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/exception-groups/modern_22.py
- Command line
-
hf download hf://datasets/SwashBuckler001/idiombench/Python/train/3.13/exception-groups/modern_22.py
-
curl -L -o modern_22.py https://huggingface.co/datasets/SwashBuckler001/idiombench/resolve/main/Python/train/3.13/exception-groups/modern_22.py
249 Bytes
| eg = ExceptionGroup("eg", [TypeError(12)]) | |
| eg.foo = 'foo' | |
| try: | |
| raise eg | |
| except* TypeError as e: | |
| e.foo = 'bar' | |
| # ^----------- ``e`` is an ephemeral object that might get | |
| # destroyed after the ``except*`` clause. | |
| eg.foo | |