Functional Error Handling in Python
summary
A tiny Pythonic library implements Option Try Either inspired by Scalaz, used to replace seven-deep nested ifs and multiple try/catch exits in a fixed‑length parser; class construction makes a Try instantiation return the proper Success/Failure child type on exception; generator comprehensions implement a do construct that composes flatMap/map logic so composed parses short‑circuit on first failure; library is pip‑installable and the rewrite improves readability and error flow without changing surrounding Python usage.
AI-written summary · about
chapters (22)
- 0:00Intro
- 2:50Programming languages
- 4:18Python
- 5:12Scala
- 6:07Closure
- 8:05Feature flags
- 9:19Rewriting code
- 11:02Scala vs Python
- 11:59PI
- 15:22Flatmap
- 17:01Try
- 18:06Scala Implementation
- 19:11Python Implementation
- 21:44PopMap
- 22:34Partial
- 24:40Generator comprehension
- 26:26Closures
- 29:03Goals
- 29:58Library
- 30:21Performance
- 32:28Types in Python
- 33:52Why Python
related talks
31mFunctional Error Handling
31mBeyond Try-Except: The Frontier of Python Error Handling with Monads and Railway Magic
51mIt Really is Easier to Ask for Forgiveness (than Permission)
29mWriting Functional Code in Python
30mFunctional Programming in Python
31mExploring Functional Options in Python
23mOr Else! An Exploration of Obscure Control Flow
27mFunctional Programming for Pythonistas
