[Python-checkins] r68659 - in tracker/instances/spambayes_integration: detectors/spambayes.py extensions/spambayes.py

martin.v.loewis python-checkins at python.org
Sat Jan 17 13:09:46 CET 2009


Author: martin.v.loewis
Date: Sat Jan 17 13:09:46 2009
New Revision: 68659

Log:
Correctly parenthize.


Modified:
   tracker/instances/spambayes_integration/detectors/spambayes.py
   tracker/instances/spambayes_integration/extensions/spambayes.py

Modified: tracker/instances/spambayes_integration/detectors/spambayes.py
==============================================================================
--- tracker/instances/spambayes_integration/detectors/spambayes.py	(original)
+++ tracker/instances/spambayes_integration/detectors/spambayes.py	Sat Jan 17 13:09:46 2009
@@ -32,7 +32,7 @@
     tokens = ["klass:%s" % klass.classname,
               "author:%s" % authorid,
               "authorage:%d" % int(math.log(authorage)),
-              "hasrev:%s" % REVPAT.search(content) is not None]
+              "hasrev:%s" % (REVPAT.search(content) is not None)]
 
 
     return (content, tokens)

Modified: tracker/instances/spambayes_integration/extensions/spambayes.py
==============================================================================
--- tracker/instances/spambayes_integration/extensions/spambayes.py	(original)
+++ tracker/instances/spambayes_integration/extensions/spambayes.py	Sat Jan 17 13:09:46 2009
@@ -19,7 +19,7 @@
     tokens = ["klass:%s" % classname,
               "author:%s" % authorid,
               "authorage:%d" % int(math.log(authorage)),
-              "hasrev:%s" % REVPAT.search(content) is not None]
+              "hasrev:%s" % (REVPAT.search(content) is not None)]
 
     return (content, tokens)
 


More information about the Python-checkins mailing list