]> git.madduck.net Git - etc/vim.git/blob - tests/data/py_311/pep_654.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Load .gitignore and exclude regex at time of use
[etc/vim.git] / tests / data / py_311 / pep_654.py
1 try:
2     raise OSError("blah")
3 except* ExceptionGroup as e:
4     pass
5
6
7 try:
8     async with trio.open_nursery() as nursery:
9         # Make two concurrent calls to child()
10         nursery.start_soon(child)
11         nursery.start_soon(child)
12 except* ValueError:
13     pass
14
15 try:
16     try:
17         raise ValueError(42)
18     except:
19         try:
20             raise TypeError(int)
21         except* Exception:
22             pass
23         1 / 0
24 except Exception as e:
25     exc = e
26
27 try:
28     try:
29         raise FalsyEG("eg", [TypeError(1), ValueError(2)])
30     except* TypeError as e:
31         tes = e
32         raise
33     except* ValueError as e:
34         ves = e
35         pass
36 except Exception as e:
37     exc = e
38
39 try:
40     try:
41         raise orig
42     except* (TypeError, ValueError) as e:
43         raise SyntaxError(3) from e
44 except BaseException as e:
45     exc = e
46
47 try:
48     try:
49         raise orig
50     except* OSError as e:
51         raise TypeError(3) from e
52 except ExceptionGroup as e:
53     exc = e