Don't make yield-from
a special form on Python 2
This commit is contained in:
parent
7d8ffc0181
commit
a979dd85f7
@ -1128,13 +1128,9 @@ class HyASTCompiler(object):
|
|||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@builds("yield_from")
|
@builds_if("yield_from", PY3)
|
||||||
@checkargs(max=1)
|
@checkargs(max=1)
|
||||||
def compile_yield_from_expression(self, expr):
|
def compile_yield_from_expression(self, expr):
|
||||||
if not PY3:
|
|
||||||
raise HyCompileError(
|
|
||||||
"yield-from only supported in python 3.3+!")
|
|
||||||
|
|
||||||
expr.pop(0)
|
expr.pop(0)
|
||||||
ret = Result(contains_yield=True)
|
ret = Result(contains_yield=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user