I'm pleased to announce the release of functional.py version 0.7, released under the GNU LGPL.
functional.py can be obtained from:
Release Name: 0.7 functional.py provides support for a functional style of Python programming.
It includes support for closures, curried functions, many higher-order functions for composing, joining or otherwise manipulating functions and other callables.
New in this release:
All the functors (callable classes) now descend from Functor, a class which provides facilities for masquerading as a function. This allows things like curries and disjoins to be passed to code which expects to be able to inspect it for things like the names of its arguments, default values, etc. These functors all provide a SimCode instance as their func_code attribute, which has most of the information that a real code object would have, which helps complete the illusion.
This release fixes bugs which affected the curry and rcurry functors. As a result, curry and rcurry will now work with any callable, not only functions and methods. This includes *classes* as well, so you can now pass a class as the first argument to curry, and when the curried function is called, the return value will be a new instance of the class.
The Lazy and LazyTuple classes, along with related items, have been removed to their own module, lazy.py.
Changes: 10/18/2000 - Version 0.7: Fix for bug in getMinimumArgCount which returned misleading results for callables.
Allow classes as first argument to curry and rcurry.
All functors now Functor subclasses.
Removed lazy functionality to lazy.py
10/12/2000 - Version 0.6: Fix for LazyTuples of length zero (thanks to Alex Martelli) Added new functions/functors: sequential also any_args always with_error attempt
10/1/2000 - Initial release 0.5
-- Bryn Keller email@example.com