As programmers, we often strive to reduce complexity. A major contributor to complexity is conditional logic (some conditionals are actually a result of bad design decisions but some are not and are easy to get rid of). In a previous post, I’ve shown how we can reduce the amount of conditional logic by using Pydantic with Literal types.

The problem with the previous post’s example (and what keeps me up at night) is that at the end it still had a single “if” statement. …

Gideon Caller

Programming, sports & a bad sense of humor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store