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

Clarify check argument is needed for github action workflow (#3325)
[etc/vim.git] / tests / data / py_310 / pep_572_py310.py
1 # Unparenthesized walruses are now allowed in indices since Python 3.10.
2 x[a:=0]
3 x[a:=0, b:=1]
4 x[5, b:=0]
5
6 # Walruses are allowed inside generator expressions on function calls since 3.10.
7 if any(match := pattern_error.match(s) for s in buffer):
8     if match.group(2) == data_not_available:
9         # Error OK to ignore.
10         pass
11
12 f(a := b + c for c in range(10))
13 f((a := b + c for c in range(10)), x)
14 f(y=(a := b + c for c in range(10)))
15 f(x, (a := b + c for c in range(10)), y=z, **q)