Revision: 3219
          http://spambayes.svn.sourceforge.net/spambayes/?rev=3219&view=rev
Author:   montanaro
Date:     2008-11-25 04:17:12 +0000 (Tue, 25 Nov 2008)

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

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

Modified: trunk/spambayes/spambayes/chi2.py
===================================================================
--- trunk/spambayes/spambayes/chi2.py   2008-11-25 04:14:57 UTC (rev 3218)
+++ trunk/spambayes/spambayes/chi2.py   2008-11-25 04:17:12 UTC (rev 3219)
@@ -1,4 +1,5 @@
 import math as _math
+import random
 
 try:
     True, False
@@ -106,7 +107,7 @@
         def __init__(self, baserandom=random.random, tabsize=513):
             self.baserandom = baserandom
             self.n = tabsize
-            self.tab = [baserandom() for i in range(tabsize)]
+            self.tab = [baserandom() for _i in range(tabsize)]
             self.next = baserandom()
 
         def random(self):
@@ -150,8 +151,8 @@
     s = Hist(20, lo=0.0, hi=1.0)
     score = Hist(20, lo=0.0, hi=1.0)
 
-    for i in range(5000):
-        ps = [random() for j in range(50)]
+    for _i in xrange(5000):
+        ps = [random() for _j in xrange(50)]
         s1, h1, score1 = judge(ps + [bias] * warp)
         s.add(s1)
         h.add(h1)
@@ -203,5 +204,4 @@
     print "(S-H+1)/2", score
 
 if __name__ == '__main__':
-    import random
     main()


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