On Thursday 13 December 2007 03:28:46 pm ALAN GAULD wrote: > Terry Carroll wrote: > > On Thu, 13 Dec 2007, Alan Gauld wrote: > >> > if self._inFlush: > >> > return > >> > self._inFlush = True > >> > .... > >> > > >> > I can not see the difference but the second one acts differently > > in > > >> > my code. > >> > >> The first has no else clause so the second assignment always > > happens. > > > Alan, are you teasing the newbies? > > No just not reading closely enough. > You are quite right, I've no idea why they would behave differently! > > John, care to elaborate on what is different? > > > Or am I just misreading this somehow? > > Nope, I was. > > Alan G.
I was attempting to debug a program. I was expecting self._inFlush to execute the return at least sometimes but not always. I then changed the code and things started working. But to my eyes I could determine the difference between if ...: return and if not ...: else: return I still don't! But for some reason it works! -- John Fabiani _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor