[EMAIL PROTECTED] wrote: > So basically trainer always gets an existing TrainingMatrix(the class) > pickled object if there is a file to read from, otherwise it just makes > a new instance. Either way, the instance trainer is pickled at the end.
Right, but the data you're interested in is contained in the class, not the instance. You need to move the mutable class attributes into the instance. Like so: class TrainingMatrix: totalWordsProcessed = 0 numWords = 0 numContexts = 0 matrixWords = 0 def __init__(self): self.matrix = [] self.estimator = {} self.wordInfo = {} self.contextInfo = {} -- Benji York -- http://mail.python.org/mailman/listinfo/python-list