]> git.madduck.net Git - etc/vim.git/blob - tests/data/python38.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 feature detection for positional-only arguments in lambdas (#2532)
[etc/vim.git] / tests / data / python38.py
1 #!/usr/bin/env python3.8
2
3
4 def starred_return():
5     my_list = ["value2", "value3"]
6     return "value1", *my_list
7
8
9 def starred_yield():
10     my_list = ["value2", "value3"]
11     yield "value1", *my_list
12
13
14 # all right hand side expressions allowed in regular assignments are now also allowed in
15 # annotated assignments
16 a : Tuple[ str, int] = "1", 2
17 a: Tuple[int , ... ] = b,  *c, d
18 def t():
19     a : str =  yield "a"
20
21
22 # output
23
24
25 #!/usr/bin/env python3.8
26
27
28 def starred_return():
29     my_list = ["value2", "value3"]
30     return "value1", *my_list
31
32
33 def starred_yield():
34     my_list = ["value2", "value3"]
35     yield "value1", *my_list
36
37
38 # all right hand side expressions allowed in regular assignments are now also allowed in
39 # annotated assignments
40 a: Tuple[str, int] = "1", 2
41 a: Tuple[int, ...] = b, *c, d
42
43
44 def t():
45     a: str = yield "a"