Davy schrieb:
On Sep 3, 11:57 am, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
Assuming the function is tail-recursive or the "unchanging" arguments
are immutable, just use a closure:
[SNIP]
Hi Chris,
Thank you :)
Perhaps I should clarify the problem.
1. the function is NOT tail-recursive
2. Yes,
On Sep 3, 11:57 am, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> Assuming the function is tail-recursive or the "unchanging" arguments
> are immutable, just use a closure:
[SNIP]
Hi Chris,
Thank you :)
Perhaps I should clarify the problem.
1. the function is NOT tail-recursive
2. Yes, the arguments
Assuming the function is tail-recursive or the "unchanging" arguments
are immutable, just use a closure:
def func(self, x, y, A, B, C):
def _func(x,y):
return _func(g(A,B,C,x), h(A,B,C,y)) #recurse
return _func(x, y)
I'm unsure as to the performance impact of this though.
- Chris