[Spambayes-checkins] spambayes/spambayes storage.py,1.11,1.12
Tim Peters
tim_one at users.sourceforge.net
Thu Jun 26 18:43:24 EDT 2003
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv22388/spambayes
Modified Files:
storage.py
Log Message:
store(): Use iteritems() instead of items() to materialize the
changed_words guts; we're not mutating changed_words here, so there's
no need to materialize a possibly giant list of 2-tuples.
Index: storage.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/storage.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** storage.py 27 Jun 2003 00:41:20 -0000 1.11
--- storage.py 27 Jun 2003 00:43:22 -0000 1.12
***************
*** 185,189 ****
# lock while we copy and reset self.changed_words would be appropriate.
# For now, just do it the naive way.
! for key, flag in self.changed_words.items():
if flag is WORD_CHANGED:
val = self.wordinfo[key]
--- 185,189 ----
# lock while we copy and reset self.changed_words would be appropriate.
# For now, just do it the naive way.
! for key, flag in self.changed_words.iteritems():
if flag is WORD_CHANGED:
val = self.wordinfo[key]
More information about the Spambayes-checkins
mailing list