chore: initialize containerized Python learning workbook (2026 DevOps/SRE)
This commit is contained in:
commit
ae4c421815
63 files changed
+1273
No files matched your search
@@ -0,0 +1,10 @@
|
||||
# 04 — Błędy i Wyjątki (`try`/`except`, własne wyjątki)
|
||||
|
||||
## Zadania (`errors_ex.py`)
|
||||
1. `parse_positive_int(raw: str) -> int` — rzuć `InvalidNumberError`, gdy nie da się sparsować do `int`, lub `NotPositiveError`, gdy `<= 0`.
|
||||
2. `safe_divide(a: float, b: float) -> float | None` — zwróć `None` zamiast `ZeroDivisionError`.
|
||||
|
||||
## Uruchomienie testów
|
||||
```bash
|
||||
make test MOD=01-core/04-errors-exceptions
|
||||
```
|
||||
Reference in new issue
Block a user