mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
tests for generator to tuple assignment as well as generator comprehensions
This commit is contained in:
@@ -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
|
||||
# -----------------
|
||||
|
||||
@@ -110,6 +110,18 @@ a
|
||||
#? str() float()
|
||||
b
|
||||
|
||||
|
||||
def simple():
|
||||
yield 1
|
||||
yield ''
|
||||
|
||||
a, b = simple()
|
||||
#? int()
|
||||
a
|
||||
#? str()
|
||||
b
|
||||
|
||||
|
||||
# -----------------
|
||||
# More complicated access
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user