Re: Model methods remember parameters?

2009-07-08 Thread derefed
Ah! That's it. Thanks for your help! On Jul 8, 10:40 pm, James Bennett wrote: > On Wed, Jul 8, 2009 at 5:04 PM, derefed wrote: > > How is it that the method's local variables are being remembered? My > > problem is solved by clearing the list at the end of the method,

Model methods remember parameters?

2009-07-08 Thread derefed
I wrote a model method that takes a list as a parameter, like so: def printList(self, l=[]): retstr = '' if len(l) > 0 and self.title in l: retstr += str(l) + "Can't do it!" else: l.append(self.title) retstr += "List so far: " + str(l) return retstr This method is