@solve.implementation(for_type=ast.Select)<EOL>def solve_select(expr, vars):
data, _ = __solve_for_repeated(expr.lhs, vars)<EOL>key = solve(expr.rhs, vars).value<EOL>try:<EOL><INDENT>results = [associative.select(d, key) for d in repeated.getvalues(data)]<EOL><DEDENT>except (KeyError, AttributeError):<EOL><INDENT>raise errors.EfilterKeyError(root=expr, key=key, query=expr.source)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>if vars.locals is None:<EOL><INDENT>raise errors.EfilterNoneError(<EOL>root=expr, query=expr.source,<EOL>message="<STR_LIT>" % key)<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>except NotImplementedError:<EOL><INDENT>raise errors.EfilterError(<EOL>root=expr, query=expr.source,<EOL>message="<STR_LIT>")<EOL><DEDENT>return Result(repeated.meld(*results), ())<EOL>
Use IAssociative.select to get key (rhs) from the data (lhs).

    This operation supports both scalars and repeated values on the LHS -
    selecting from a repeated value implies a map-like operation and returns a
    new repeated value.