New submission from Jason Baker <amnorv...@gmail.com>:

I've created a patch that adds some common functional programming tools to 
functools.  I've made the patch to work against Python 3.2, but that may be a 
bit aggressive.  If so, then I can adapt it to work with 3.3.

I also wouldn't be opposed to writing some of these in C if there's a 
performance need.

The functions I added are:

* flip - flip the first two arguments of a function
* const - return a function that always returns the same thing
* compose - compose multiple functions together
* identity - returns what is passed in to it
* trampoline - calls a function and then calls any returned functions.

----------
components: Library (Lib)
files: functools.patch
keywords: patch
messages: 127062
nosy: Jason.Baker
priority: normal
severity: normal
status: open
title: More functools functions
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20520/functools.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11011>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to