by demetri · 9y ago · 0 comments
Enumerations are useful for a number of reasons in typed, compiled languages (I guess they provide readability in Python), but they are not the same as monads (of which Either is one type). I am not a Python developer, but as far as I can tell, this implementation gets you none of the real benefits that an a true Either implementation would get you in terms of functional goodness.
Am I missing something here? Is there some kind of Python magic that makes this better than just propagating the exception?