[Spambayes-checkins] spambayes Corpus.py,1.2.2.2,1.2.2.3
Tim Stone
timstone4@users.sourceforge.net
Mon Nov 25 04:59:53 2002
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv19513
Modified Files:
Tag: hammie-playground
Corpus.py
Log Message:
Changed use of Verbose to __debug__ (I'm learning all the time)
Index: Corpus.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Corpus.py,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -d -r1.2.2.2 -r1.2.2.3
*** Corpus.py 22 Nov 2002 02:07:33 -0000 1.2.2.2
--- Corpus.py 25 Nov 2002 04:59:51 -0000 1.2.2.3
***************
*** 90,94 ****
SPAM = True
HAM = False
- Verbose = False
class Corpus:
--- 90,93 ----
***************
*** 115,119 ****
'''Add a Message to this corpus'''
! if Verbose:
print 'adding message %s to corpus' % (message.key())
--- 114,118 ----
'''Add a Message to this corpus'''
! if __debug__:
print 'adding message %s to corpus' % (message.key())
***************
*** 134,138 ****
key = message.key()
! if Verbose:
print 'removing message %s from corpus' % (key)
self.unCacheMessage(key)
--- 133,137 ----
key = message.key()
! if __debug__:
print 'removing message %s from corpus' % (key)
self.unCacheMessage(key)
***************
*** 152,156 ****
key = message.key()
! if Verbose:
print 'placing %s in corpus cache' % (key)
--- 151,155 ----
key = message.key()
! if __debug__:
print 'placing %s in corpus cache' % (key)
***************
*** 169,173 ****
# This method should probably not be overridden
! if Verbose:
print 'Flushing %s from corpus cache' % (key)
--- 168,172 ----
# This method should probably not be overridden
! if __debug__:
print 'Flushing %s from corpus cache' % (key)
***************
*** 249,253 ****
Corpus.cacheMessage(self, msg)
else:
! if Verbose:
print 'Not caching %s because it has expired' % (msg.key())
raise KeyError, msg
--- 248,252 ----
Corpus.cacheMessage(self, msg)
else:
! if __debug__:
print 'Not caching %s because it has expired' % (msg.key())
raise KeyError, msg
***************
*** 262,266 ****
msg = self[key]
except KeyError, e:
! if Verbose:
print 'message %s has expired' % (key)
self.removeMessage(e[0])
--- 261,265 ----
msg = self[key]
except KeyError, e:
! if __debug__:
print 'message %s has expired' % (key)
self.removeMessage(e[0])
More information about the Spambayes-checkins
mailing list