[Persistence-sig] A simple Observation API
Barry A. Warsaw
barry@python.org
Wed, 31 Jul 2002 08:21:48 -0400
>>>>> "NS" == Niki Spahiev <niki@vintech.bg> writes:
| def addDate(self, date):
| self._p_changed = 1
| self.dates.append(date) # self.dates is a simple list
| self.dates.sort()
| self._p_changed = 1
NS> _p_changed before *and* after?
Seems unnecessarily redundant. IIUC, setting _p_changed to 1 will
register the object so setting it twice simply registers it twice,
which doesn't seem very useful. I guess when to set _p_changed will
be a decision that the object designer will have to make based on the
semantics of the object, and the operation.
-Barry