If you want a "frozen" function (that is, a function already set-up with the parameters taken from the current values of x.a, x.b) use functools.partial:
OK, that's also a nice idea. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list