Otázka
📝 **Úloha:** Zostavte malý \`memory_estimator(rows, bytes_per_row, overhead_pct)\`, ktorý vráti celkovú pamäť v MB (pohyblivá, 2 desatinné miesta):
\`\`\`
celkove_bajty = riadky * bajty_na_riadok * (1 + režijné_pct / 100)
mb = total_bytes / 1_000_000 # desatinné MB — zodpovedá konvencii Prometheus/Grafana
návratové kolo (mb, 2)
\`\`\`
Otestujte 3 realistické škály: malá vyrovnávacia pamäť v pamäti, dátový rámec pandy strednej veľkosti, veľký súbor údajov Redis.
📋 Implementujte funkciu vyššie. Testy prebiehajú automaticky.
💡 **Tip:** Znova si prečítajte teóriu, ak sa zaseknete.
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.