Some time ago I looked over Haskell docs and found it\'s functional composition operator really nice. So I\'ve implemented this tiny decorator:
from functools im
IMHO: no, it's not. While I like Haskell, this just doesn't seem to fit in Python. Instead of (f1 >> f2 >> f3)
you can do compose(f1, f2, f3)
and that solves your problem -- you can use it with any callable without any overloading, decorating or changing the core (IIRC somebody already proposed functools.compose
at least once; I can't find it right now).
Besides, the language definition is frozen right now, so they will probably reject that kind of change anyway -- see PEP 3003.