Briefle words · Code & architecture
Timeout
A maximum time your code will wait for another system to answer before giving up.
Say it to an AI
Python refresh_rates() using requests to fetch EUR exchange rates. Always set an explicit connect/read timeout (3s/5s); on any request error log a warning and degrade gracefully by returning a last-known copy kept without TTL (raise if there is none yet), since this runs inside a user's search request.
How an expert would brief the stronger version of “Exchange rate refresh”.
See it
Try it as a puzzle →A hotel booking site converts prices into the visitor's currency, refreshing rates from a third-party feed during a search.
Why: B passes timeout=(3.05, 5) to requests.get. A passes nothing, and requests will then wait indefinitely.
Related words
Room 4 · Errors & edge cases
Learn “Timeout” in a five-minute lesson