Next / Previous / Contents / Shipman's homepage

8.10. DayNotes.__init__(): Constructor

All we do here is to store the various initial attributes, and set up the initial invariants.

birdnotes.py
# - - -   D a y N o t e s . _ _ i n i t _ _

    def __init__(self, noteSet, regionCode, date, daySummary,
                   dayLoc=None):
        #-- 1 --
        # [ self  :=  self with all initial invariants established ]
        self.noteSet = noteSet
        self.txny = noteSet.txny
        self.regionCode = regionCode
        self.date = date
        self.daySummary = daySummary
        self.dayLoc = dayLoc
        self._numberAdded = 0
        self._seqMap = {}
        self._txMap = {}

        #-- 2
        # [ noteSet  +:=  self ]
        noteSet.addDay(self)