(node, globals_=None)
return getattr(module, node.name)
Convert an AST into a function with inspectable source.
    This function uses `compile_file` internally, but instead of returning the
    entire module it will return the function only.
    Args:
    node: A `FunctionDef` node or a `Module` node which contains at least one
        `FunctionDef` node. If a module contains multiple functions, a handle
        to the first one will be returned.
    globals_: See `compile_file`
    Returns:
    A handle to the compiled function.
    Raises:
    TypeError: If the input is not a string or AST.
    ValueError: If no function can be found.
Convert an AST into a function with inspectable source.
    This function uses `compile_file` internally, but instead of returning the
    entire module it will return the function only.
    Args:
    node: A `FunctionDef` node or a `Module` node which contains at least one
        `FunctionDef` node. If a module contains multiple functions, a handle
        to the first one will be returned.
    globals_: See `compile_file`
    Returns:
    A handle to the compiled function.
    Raises:
    TypeError: If the input is not a string or AST.
    ValueError: If no function can be found.
Convert an AST into a function with inspectable source . This function uses compile_file internally but instead of returning the entire module it will return the function only . Args : node : A FunctionDef node or a Module node which contains at least one FunctionDef node . If a module contains multiple functions a handle to the first one will be returned . globals_ : See compile_file Returns : A handle to the compiled function . Raises : TypeError : If the input is not a string or AST . ValueError : If no function can be found .
def compile_function(node, globals_=None):
    """Convert an AST into a function with inspectable source.
    This function uses `compile_file` internally, but instead of returning the
    entire module it will return the function only.
    Args:
    node: A `FunctionDef` node or a `Module` node which contains at least one
        `FunctionDef` node. If a module contains multiple functions, a handle
        to the first one will be returned.
    globals_: See `compile_file`
    Returns:
    A handle to the compiled function.
    Raises:
    TypeError: If the input is not a string or AST.
    ValueError: If no function can be found.
    """
    module = compile_file(node, globals_)
    return getattr(module, node.name)
def compile_function ( node , globals_ = None ) : module = compile_file ( node , globals_ ) return getattr ( module , node . name )