Thu 27 Apr 2006
Version 06. of the functional package has been pushed out to PyPI and the project’s own website. This release features:
-
functional.flipwill now reverse all non-keyword arguments, as opposed to simply reversing the first two as it did in version 0.5. -
functional.composenow comes with an optionalunpackparameter to make up for some of the differences between Python and Haskell (which inspired most of thefunctionalpackage), namely that Haskell functions are fully curried and Python functions usually aren’t.The
unpackparameter means that you can now do something like this withcompose:f(*g(*arg,**kw))
i.e., automatically unpacking
g’s return value and passing the result tof.To get this functionality, you’d write something like
compose(f, g, unpack=True)(*args, **kwargs)
-
Add weakref support to
flipandcomposeobjects in the C version. -
Sundry performance improvements for the C implementation.