@decorators.raise_if_nothing_inferred<EOL>@decorators.path_wrapper<EOL>def _infer_boolop(self, context=None):
values = self.values<EOL>if self.op == "<STR_LIT>":<EOL><INDENT>predicate = operator.truth<EOL><DEDENT>else:<EOL><INDENT>predicate = operator.not_<EOL><DEDENT>try:<EOL><INDENT>values = [value.infer(context=context) for value in values]<EOL><DEDENT>except exceptions.InferenceError:<EOL><INDENT>yield util.Uninferable<EOL>return None<EOL><DEDENT>for pair in itertools.product(*values):<EOL><INDENT>if any(item is util.Uninferable for item in pair):<EOL><INDENT>yield util.Uninferable<EOL>continue<EOL><DEDENT>bool_values = [item.bool_value() for item in pair]<EOL>if any(item is util.Uninferable for item in bool_values):<EOL><INDENT>yield util.Uninferable<EOL>continue<EOL><DEDENT>value = util.Uninferable<EOL>for value, bool_value in zip(pair, bool_values):<EOL><INDENT>if predicate(bool_value):<EOL><INDENT>yield value<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>yield value<EOL><DEDENT><DEDENT>return dict(node=self, context=context)<EOL>
Infer a boolean operation (and / or / not).

    The function will calculate the boolean operation
    for all pairs generated through inference for each component
    node.