See the notes about overall structure in Section 23.19, “
MonthCell.__birdForm(): Render one
# - - - M o n t h C e l l . _ _ s i n g le S i g h t i n g def __singleSighting ( self, parent, birdForm ): '''Render the single-sighting case of a bird form. [ (parent is an et.element) and (birdForm is a birdnotes.BirdForm instance with one sighting) -> parent +:= (that sighting's age-sex-group) + (that sighting's loc-group, if any) + (that sighting's sighting-notes, if any) ] '''
#-- 1 -- # [ sight := the first child sighting of birdForm ] sight = birdForm #-- 2 -- # [ if sight.ageSexGroup is not None -> # parent +:= XHTML rendering of sight.ageSexGroup # else -> I ] if sight.ageSexGroup is not None: self.__ageSexGroup ( parent, sight.ageSexGroup )
#-- 3 -- # [ paretn +:= XHTML rendering of sight's effective locality ] self.__locGroup ( parent, sight.getLocGroup() )
#-- 4 -- # [ if sight.sightNotes is not None -> # parent +:= XHTML rendering of sight.sightNotes # else -> I ] if sight.sightNotes is not None: self.__sightNotes ( parent, sight.sightNotes )