3 ms·
I'm trying to parse this explanation. What's the difference between a monad and overriding __getattr__ in Python?
by csense 14y ago
I'm trying to parse this explanation. What's the difference between a monad and overriding __getattr__ in Python?
- chongli 14y agoApples and oranges. A monad is just an idea; that of storing computations as values. This is useful because these computations can be composed together in a manner not unlike that of a pipeline in shell scripting. Different monads define different ways of composing these computations leading to vastly different semantics. Here's a nice video that explains monads fairly simply: http://www.youtube.com/watch?v=ZhuHCtR3xq8 http://www.youtube.com/watch?v=ZhuHCtR3xq8