On a related note, I've been intrigued by Haskell's idea of currying all functions, and have an implementation that works for pure functions but not for callable classes or methods over on https://github.com/sigmavirus24/curryer.
On Thu, Nov 14, 2013 at 4:45 AM, Andrew Barnert email@example.com wrote:
I think the discussions on expression-template quick lambdas and auto-partialing functions are both way off topic for the thread about changing Python syntax to allow function calls without parens (or just print, or whatever). And I don't think they really belong on python-ideas at all (unless someone has a suggestion for language or stdlib support for either, which seems unlikely).
Since I started both ideas, the derailing is entirely my fault.
Anyway, if anyone's interested, I slapped together a quick implementation of each idea. https://github.com/abarnert/quicklambda is incomplete, but playable-with; https://github.com/abarnert/quickpartial is not working at all (in fact, I haven't even pushed a commit yet).
On Nov 13, 2013, at 20:17, Haoyi Li firstname.lastname@example.org wrote:
I personally like the _ notation used by scala; with macros you could easily write something like:
f[spam(_, 5)] f[spam(_, n=_)]
Python-ideas mailing list Pythonemail@example.com https://mail.python.org/mailman/listinfo/python-ideas