tests for generator to tuple assignment as well as generator comprehensions

This commit is contained in:
Dave Halter
2014-06-10 00:40:38 +02:00
parent af801ef9b4
commit 9cffbef608
2 changed files with 19 additions and 0 deletions

View File

@@ -177,6 +177,13 @@ left, right = (i for i in (1, ''))
#? int()
left
gen = (i for i in (1,))
#? int()
next(gen)
#?
gen[0]
# -----------------
# ternary operator
# -----------------

View File

@@ -110,6 +110,18 @@ a
#? str() float()
b
def simple():
yield 1
yield ''
a, b = simple()
#? int()
a
#? str()
b
# -----------------
# More complicated access
# -----------------