]> git.madduck.net Git - etc/vim.git/blobdiff - 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:

Update README.md (#3284)
[etc/vim.git] / tests / data / py_310 / pep_572_py310.py
index 2aef589ce8d1bf78edb14a940b0072379225a43b..cb82b2d23f8a49d54a615605105100c62942ebba 100644 (file)
@@ -2,3 +2,14 @@
 x[a:=0]
 x[a:=0, b:=1]
 x[5, b:=0]
 x[a:=0]
 x[a:=0, b:=1]
 x[5, b:=0]
+
+# Walruses are allowed inside generator expressions on function calls since 3.10.
+if any(match := pattern_error.match(s) for s in buffer):
+    if match.group(2) == data_not_available:
+        # Error OK to ignore.
+        pass
+
+f(a := b + c for c in range(10))
+f((a := b + c for c in range(10)), x)
+f(y=(a := b + c for c in range(10)))
+f(x, (a := b + c for c in range(10)), y=z, **q)