Pitanje
📝 **Zadatak:** Izgradite mali \`memory_estimator(rows, bytes_per_row, overhead_pct)\` koji vraća ukupnu memoriju u MB (float, 2 decimale):
\`\`\`
total_bytes = retci * bytes_per_row * (1 + overhead_pct / 100)
mb = total_bytes / 1_000_000 # decimala MB — odgovara Prometheus/Grafana konvenciji
povratni krug (mb, 2)
\`\`\`
Testirajte 3 realistične ljestvice: mala predmemorija u memoriji, pandas DataFrame srednje veličine, veliki Redis skup podataka.
📋 Implementirajte gornju funkciju. Testovi se pokreću automatski.
💡 **Savjet:** Ponovno pročitajte teoriju ako zapnete.
A Re-raising — wrapping a caught exception with `raise NewError() from e` loses the original traceback line numbers. B Bare `except: pass` — silently swallows everything including KeyboardInterrupt, SystemExit, and bugs you should fix. C Defining custom exception subclasses — every new exception type forces consumers to update their `except` tuples. D Catching at the boundary — handling errors in a middleware layer is too late for the caller to recover meaningfully.