Code Room
Code reviewHardcr-g602
Subject Http no retry backoffLevel Senior–Staff~20 minCommon in Networking & APIs interviewsIndustries Software development, Technology

Question

Review this Python wrapper that retries a flaky read API.

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.

Talk through your review
Code to reviewpython
import requests, time def get_quote(symbol):    while True:        try:            r = requests.get(f"https://quotes.internal/{symbol}", timeout=2)            r.raise_for_status()            return r.json()        except requests.RequestException:            time.sleep(0.05)
Run or narrate your approach, then ask the coach.