Add a snippet in syntax_generator.py

This commit is contained in:
Charles Marsh committed 2022-08-21 11:07:49 -04:00
1 parent e04d2ace1f
commit 32030a0f89
1 file changed
+3
+3
View File
@@ -17,6 +17,9 @@ assert r == [1, 2, 42, 3]
r = list(x for x in [1, 2, 3])
assert r == [1, 2, 3]
r = list(y := x + 1 for x in [1, 2, 3])
assert r == [2, 3, 4]
def g2(x):
x = yield x
yield x + 5