From: Catalin Marinas Date: Thu, 03 Jul 2008 22:05:45 GMT Subject: Re: [StGit PATCH 03/14] Write to a stack log when stack is modified Message-ID: In-Reply-To: <20080701201355.GA19096@diana.vm.bytemark.co.uk> 2008/7/1 Karl Hasselström : > On 2008-06-17 17:32:47 +0200, Karl Hasselström wrote: > >> On 2008-06-17 15:11:42 +0100, Catalin Marinas wrote: >> >> > 2008/6/17 Karl Hasselström : >> > >> > > On 2008-06-17 11:24:53 +0100, Catalin Marinas wrote: >> > > >> > > > 2008/6/12 Karl Hasselström : >> > > > >> > > > > class _Directory(object): >> > > > > - def __init__(self, needs_current_series = True): >> > > > > + def __init__(self, needs_current_series = True, log = True): >> > > > >> > > > i.e. we make log = False here by default. >> > > >> > > I might not have understood precisely what you meant; but I >> > > don't think API backwards compatibilty should be an issue here? >> > > I simply fix all callers. If log should default to true or false >> > > is immaterial -- it just means some extra text in one or the >> > > other of two equally common cases. >> > >> > Not an issue, I just favour the existing one when the two cases >> > are almost equal. >> >> Fair enough. I'll change it. > > I had an even better idea: no default value. Every caller gets to say > either log = True or log = False, which makes it immediately obvious > to the reader. (That is, every caller still using the old > infrastructure; with the new infrastructure, we log if and only if a > transaction is run.) Fair enough. -- Catalin