[Spambayes-checkins] spambayes storage.py,1.6,1.7

Richie Hindle richiehindle at users.sourceforge.net
Sun Jan 5 14:17:16 EST 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv25359

Modified Files:
	storage.py 
Log Message:
Use binary pickles by default, to save space (and probably time).


Index: storage.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/storage.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** storage.py	3 Dec 2002 20:11:18 -0000	1.6
--- storage.py	5 Jan 2003 22:17:13 -0000	1.7
***************
*** 54,57 ****
--- 54,63 ----
  import dbmstorage
  
+ # Make shelve use binary pickles by default.
+ oldShelvePickler = shelve.Pickler
+ def binaryDefaultPickler(f, binary=1):
+     return oldShelvePickler(f, binary)
+ shelve.Pickler = binaryDefaultPickler
+ 
  PICKLE_TYPE = 1
  NO_UPDATEPROBS = False   # Probabilities will not be autoupdated with training





More information about the Spambayes-checkins mailing list