Fri 7 Apr 2006
That long-neglected ~/src/functional directory has finally guilted me back into action. Responding to a number of user suggestions, here are some things that will be going into the next release of functional:
-
functional.flipwill now reverse all non-keyword arguments, as opposed to simply reversing the first two as it does now. -
I’m going to provide some way of augmenting
functional.composeto 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.This difference means that you currently can’t do something like this with
compose:f(*g(*arg,**kw))
i.e., automatically unpacking
g’s return value and passing the result tof.One idea I’m kicking around is an
unpackkeyword argument tocompose. Setting this to a true value would result ing’s return value being unpacked before going tof, while setting it to false (the default) would pass the return value straight through. So, to get the functionality outlined above, you’d write something likecompose(f, g, unpack=True)(*args, **kwargs)
-
Add weakref support to
flipandcomposeobjects in the C version. -
Sundry performance improvements for the C implementation.
I’m hoping to have 0.6 out sometime early next week (maybe 10 or 11 April).
Why do a minor release (from 0.5 to 0.6) instead of a point release (from 0.5 to 0.5.1)? The changes to flip aren’t backwards-compatible, and I want to be sure people know that. Hopefully the current interface will settle down some, and things will tip toward doing more point releases than minor releases.