Revision: 3195
          http://spambayes.svn.sourceforge.net/spambayes/?rev=3195&view=rev
Author:   montanaro
Date:     2008-11-25 02:00:09 +0000 (Tue, 25 Nov 2008)

Log Message:
-----------
pylint nits

Modified Paths:
--------------
    trunk/spambayes/spambayes/CostCounter.py

Modified: trunk/spambayes/spambayes/CostCounter.py
===================================================================
--- trunk/spambayes/spambayes/CostCounter.py    2008-11-25 01:59:43 UTC (rev 
3194)
+++ trunk/spambayes/spambayes/CostCounter.py    2008-11-25 02:00:09 UTC (rev 
3195)
@@ -16,7 +16,7 @@
         return "%s: $%.4f" % (self.name, self.total)
 
 class CompositeCostCounter:
-    def __init__(self,cclist):
+    def __init__(self, cclist):
         self.clients = cclist
 
     def spam(self, scr):
@@ -34,10 +34,10 @@
         return '\n'.join(s)
 
 class DelayedCostCounter(CompositeCostCounter):
-    def __init__(self,cclist):
-        CompositeCostCounter.__init__(self,cclist)
-        self.spamscr=[]
-        self.hamscr=[]
+    def __init__(self, cclist):
+        CompositeCostCounter.__init__(self, cclist)
+        self.spamscr = []
+        self.hamscr = []
 
     def spam(self, scr):
         self.spamscr.append(scr)
@@ -47,10 +47,10 @@
 
     def __str__(self):
         for scr in self.spamscr:
-            CompositeCostCounter.spam(self,scr)
+            CompositeCostCounter.spam(self, scr)
         for scr in self.hamscr:
-            CompositeCostCounter.ham(self,scr)
-        s=[]
+            CompositeCostCounter.ham(self, scr)
+        s = []
         for line in CompositeCostCounter.__str__(self).split('\n'):
             s.append('Delayed-'+line)
         return '\n'.join(s)
@@ -108,7 +108,7 @@
                     zd(100.*(self._fp+self._fn),self._total),
                     zd(100.*self._unsure,self._total)))
 
-def zd(x,y):
+def zd(x, y):
     if y > 0:
         return x / y
     else:
@@ -180,12 +180,12 @@
                Flex2CostCounter(),
            ])
 
-if __name__=="__main__":
-    cc=default()
+if __name__ == "__main__":
+    cc = default()
     cc.ham(0)
     cc.spam(1)
     cc.ham(0.5)
     cc.spam(0.5)
-    options["Categorization", "spam_cutoff"]=0.7
-    options["Categorization", "ham_cutoff"]=0.4
+    options["Categorization", "spam_cutoff"] = 0.7
+    options["Categorization", "ham_cutoff"] = 0.4
     print cc


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to