Python: flow through yield

- add yield as a dataflow return
- replace comprehension store step
   with a store step to the yield
This commit is contained in:
Rasmus Lerchedahl Petersen
2024-09-30 09:01:29 +02:00
parent 72530a8312
commit d4ea62edec
3 changed files with 41 additions and 5 deletions

View File

@@ -245,7 +245,7 @@ def gen(x):
def test_yield():
g = gen(SOURCE)
SINK(next(g)) #$ MISSING:flow="SOURCE, l:-1 -> next()"
SINK(next(g)) #$ flow="SOURCE, l:-1 -> next(..)"
def gen_from(x):
@@ -260,7 +260,7 @@ def test_yield_from():
# a statement rather than an expression, but related to generators
def test_for():
for x in gen(SOURCE):
SINK(x) #$ MISSING:flow="SOURCE, l:-1 -> x"
SINK(x) #$ flow="SOURCE, l:-1 -> x"
# 6.2.9.1. Generator-iterator methods