This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients alex, collinwinter, eric.araujo, ezio.melotti, gregory_p, markonervo, pitrou, rhettinger, serprex
Date 2011-11-18.17:03:04
SpamBayes Score 0.0012386171
Marked as misclassified No
Message-id <1321635785.16.0.616079076639.issue13430@psf.upfronthosting.co.za>
In-reply-to
Content
To go back to your original message:

> I think it would be very usefull to add a curry function to the functools module.

For what use cases?

> Curried functions could be used as follow.
>>> adder(2, 3, 4)
>>> adder(2, 3)(4)
>>> adder(2)(3)(4)
>>> adder(z = 4)(2, 3)  # etc, etc, etc...

I don’t know the curry concept from other languages, but I’m experienced with Python and don’t like this idea at all.  A function returns something; the returned value being callable or not is a property of that value, not of the function.  The examples above look confusing to me.

I think you should discuss your use cases on the python-ideas mailing list.
History
Date User Action Args
2011-11-18 17:03:05eric.araujosetrecipients: + eric.araujo, collinwinter, rhettinger, pitrou, gregory_p, ezio.melotti, alex, serprex, markonervo
2011-11-18 17:03:05eric.araujosetmessageid: <1321635785.16.0.616079076639.issue13430@psf.upfronthosting.co.za>
2011-11-18 17:03:04eric.araujolinkissue13430 messages
2011-11-18 17:03:04eric.araujocreate