Steve Holden wrote: > No. It's too horrible to contemplate without getting mild feelings of > nausea. What exactly is it you are tring to achieve here (since I assume > your goal wasn't to make me feel sick :-)?
It is part of an algorithum: #!/usr/bin/env python def A(k, x1, x2, x3, x4, x5): def B(): k = k - 1; B.out=A.out=A(k, B, x1, x2, x3, x4) return B.out if k <= 0: A.out = x4 + x5 else: B() return A.out print A(10, 1, -1, -1, 1, 0); # correct output is -67 The scope of k remains one problem, as it is passed as an argument to A. I think x1,x2,x3,x4 are meant to be lambdas as well... :-) N -- http://mail.python.org/mailman/listinfo/python-list