Roman Suzi
Oct 16, 2021

--

"11 — Returning different types in a single function" - having None for missing values is not a problem at all. It can be even type-hinted with Optional (also known as Maybe) type. Of course, depends on the case, but having Maybe helps to keep the calculations in functional way (unlike exceptions).

Actually, you contradict yourself with examples from "15 - Not using get()...", which supports the same style.

--

--

No responses yet