コード例 #1
0
def buildYieldFromNode(provider, node, source_ref):
    assert python_version >= 330

    _checkInsideGenerator(provider, node, source_ref)

    return ExpressionYieldFrom(expression=buildNode(provider, node.value,
                                                    source_ref),
                               source_ref=source_ref)
コード例 #2
0
def buildYieldFromNode(provider, node, source_ref):
    assert Utils.python_version >= 330

    _markAsGenerator(provider, node, source_ref)

    iter_arg = ExpressionBuiltinIter1(value=buildNode(provider, node.value,
                                                      source_ref),
                                      source_ref=source_ref)

    return ExpressionYieldFrom(expression=iter_arg, source_ref=source_ref)