I love libraries like this and fn.py, and I really miss the things I've got used to having available in Haskell when I write python. It's possible to use function patterns in python (Applicative and Functor are things you can implement in any language). However given who is in charge of python and the way he feels about FP, I don't think python will ever be a decent functional programming environment:
As long as I'm "in charge" the chances of this (or anything like it) being accepted into
Python are zero. I get a headache when I try to understand code that uses function
composition, and I end up having to laboriously rewrite it using more traditional
call notation before I move on to understanding what it actually does. Python is not
Haskell, and perhaps more importantly, Python users are not like Haskell users.
Either way, what may work out beautifully in Haskell will be like a
fish out of water in Python.
I understand that it's fun to try to sole this puzzle, but evolving Python is more than
solving puzzles. Enjoy debating the puzzle, but in the end Python will survive
without the solution.
http://stackoverflow.com/questions/1017621/why-isnt-python-v...