From the blog, it has the following piece of code:
def outcome(hiring_procedure): allowable_candidates = [c for c in all_candidates if hiring_procedure(c)] candidate_values = [risk_profile(value(c)) for c in allowable_candidates] return candidate_values.sum() / len(candidate_values)
What happens if we get to the return line, with an empty candidate_values? ZeroDivisionError ?