Re: Pass same parameter in Recursive function

2008-09-03 Thread Diez B. Roggisch
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,

Re: Pass same parameter in Recursive function

2008-09-02 Thread Davy
- Chris > > > > > > On Tue, Sep 2, 2008 at 8:20 PM, Davy <[EMAIL PROTECTED]> wrote: > > Hi all, > > > Sometimes I need to pass same parameter in recursive function. From my > > point of view, the style is redundant, and I don't what to use some >

Re: Pass same parameter in Recursive function

2008-09-02 Thread Chris Rebert
of this though. - Chris On Tue, Sep 2, 2008 at 8:20 PM, Davy <[EMAIL PROTECTED]> wrote: > Hi all, > > Sometimes I need to pass same parameter in recursive function. From my > point of view, the style is redundant, and I don't what to use some > global style like self.A, self.B, I

Pass same parameter in Recursive function

2008-09-02 Thread Davy
Hi all, Sometimes I need to pass same parameter in recursive function. From my point of view, the style is redundant, and I don't what to use some global style like self.A, self.B, Is there any other choice? For example, def func(self, x, y, A, B, C): #x, y change in recursive call #A,