Code Room
Code reviewMedium
Question
Review this Python function that fans out a notification to many recipients. `send` calls an email provider and may raise on a single bad address or a transient error.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
def send(recipient, message): resp = provider.send_email(to=recipient, body=message) resp.raise_for_status() # raises on 4xx/5xx def notify_all(recipients, message): sent = 0 for r in recipients: send(r, message) sent += 1 logging.info("notified %d recipients", sent) return sentRun or narrate your approach, then ask the coach.