]> git.madduck.net Git - etc/vim.git/blob - tests/data/cases/preview_context_managers_autodetect_310.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:

Fix merging implicit multiline strings that have inline comments (#3956)
[etc/vim.git] / tests / data / cases / preview_context_managers_autodetect_310.py
1 # flags: --preview --minimum-version=3.10
2 # This file uses pattern matching introduced in Python 3.10.
3
4
5 match http_code:
6     case 404:
7         print("Not found")
8
9
10 with \
11      make_context_manager1() as cm1, \
12      make_context_manager2() as cm2, \
13      make_context_manager3() as cm3, \
14      make_context_manager4() as cm4 \
15 :
16     pass
17
18
19 # output
20
21
22 # This file uses pattern matching introduced in Python 3.10.
23
24
25 match http_code:
26     case 404:
27         print("Not found")
28
29
30 with (
31     make_context_manager1() as cm1,
32     make_context_manager2() as cm2,
33     make_context_manager3() as cm3,
34     make_context_manager4() as cm4,
35 ):
36     pass