mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add a snippet in syntax_generator.py
This commit is contained in:
1 parent
e04d2ace1f
commit
32030a0f89
1 file changed
+3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user