Fix issues with yield.

This commit is contained in:
Dave Halter
2017-09-01 18:38:19 +02:00
parent e2d53f51b0
commit c47f5ca68c
4 changed files with 34 additions and 2 deletions

View File

@@ -179,6 +179,25 @@ gen().send()
#?
gen()()
# -----------------
# empty yield
# -----------------
def x():
yield
#? None
next(x())
#? gen()
x()
def x():
for i in range(3):
yield
#? None
next(x())
# -----------------
# yield in expression
# -----------------