My problem is that I don't really know how to instantiate the entry...I'm not used to dynamically typed languages like Python.
The actual values are supplied in the JournalEntry class. For example, an entry could be entry1 = journalentry.JournalEntry("1215", "02142013", "My day", "Today was Valentine's Day.").
Class Journal(object):
def __init__(self):
journalList = []
def addEntry(self, entry):
self.theEntry = entry #is this right?
self.theEntry = entry(time, date, subject, context) #or is this?
journalList += entry
The Journal constructor creates an empty list, and then addEntry would add an entry to the list each time. Will this work?

New Topic/Question
Reply




MultiQuote




|