(codegen, impl_name)
return _df_impl_generator
Generate generator of an implementation
Generate generator of an implementation
Generate generator of an implementation
def gen_impl_generator(codegen, impl_name):
    """Generate generator of an implementation"""
    def _df_impl_generator(*args, **kwargs):
        func_text, global_vars = codegen(*args, **kwargs)

        loc_vars = {}
        exec(func_text, global_vars, loc_vars)
        _impl = loc_vars[impl_name]

        return _impl

    return _df_impl_generator
def gen_impl_generator ( codegen , impl_name ) : def _df_impl_generator ( * args , * * kwargs ) : func_text , global_vars = codegen ( * args , * * kwargs ) loc_vars = { } exec ( func_text , global_vars , loc_vars ) _impl = loc_vars [ impl_name ] return _impl return _df_impl_generator