]> granicus.if.org Git - python/commitdiff
"if match(x) >= 0:" smells of regex matching; should use "if match(x):"
authorGuido van Rossum <guido@python.org>
Tue, 23 Jun 1998 14:43:06 +0000 (14:43 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 23 Jun 1998 14:43:06 +0000 (14:43 +0000)
Lib/mhlib.py

index 85bf2cd3f6178de015f3373a789c4ef0ad5d1dbb..5de153851bd603924383c0c20392cb8c9e78bfd6 100644 (file)
@@ -284,7 +284,7 @@ class Folder:
         match = numericprog.match
         append = messages.append
         for name in os.listdir(self.getfullname()):
-            if match(name) >= 0:
+            if match(name):
                 append(name)
         messages = map(string.atoi, messages)
         messages.sort()