tdelaney at avaya.com
Tue Nov 27 02:52:33 CET 2001
> From: James A. H. Skillen [mailto:jahs at jahs.org]
> Has anyone ever wished that Python had operators defined on functions?
> For example, suppose you want the function f(x) = cos(x) + sin(x).
> You could do:
> def f(x):
> return cos(x) + sin(x)
> f = lambda x: cos(x) + sin(x)
> but wouldn't:
> f = cos + sin
> be *much* nicer?
You could do all of this using callable classes. Wouldn't even be
For a few pointers in the right direction, look at the currying classes at
More information about the Python-list