Add basic yield from type inference. References #647.

This commit is contained in:
Dave Halter committed 2016-07-09 02:33:56 +02:00
1 parent 5280f567f9
commit e0cb1346e1
4 files changed
+43 -6

No files matched your search

+22
View File
@@ -175,3 +175,25 @@ gen().send()
#?
gen()()
# -----------------
# yield from
# -----------------
# python >= 3.3
def yield_from():
yield from iter([1])
#? int()
next(yield_from())
def yield_from_multiple():
yield from iter([1])
yield str()
x, y = yield_from_multiple()
#? int()
x
#? str()
y