]> granicus.if.org Git - python/commitdiff
Merge Py Idle changes:
authorKurt B. Kaiser <kbk@shore.net>
Wed, 18 Sep 2002 03:10:10 +0000 (03:10 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Wed, 18 Sep 2002 03:10:10 +0000 (03:10 +0000)
Rev 1.3 tim_one
Convert a pile of obvious "yes/no" functions to return bool.

Lib/idlelib/SearchDialog.py

index 0f0cb189f6b7ed5db5c4d3c08d7954b6dcf275e2..8d275c4437b6cf1316e4116e93fc2df74c2ecc06 100644 (file)
@@ -34,9 +34,9 @@ class SearchDialog(SearchDialogBase):
     def find_again(self, text):
         if not self.engine.getpat():
             self.open(text)
-            return 0
+            return False
         if not self.engine.getprog():
-            return 0
+            return False
         res = self.engine.search_text(text)
         if res:
             line, m = res
@@ -48,17 +48,17 @@ class SearchDialog(SearchDialogBase):
                 sellast = text.index("sel.last")
                 if selfirst == first and sellast == last:
                     text.bell()
-                    return 0
+                    return False
             except TclError:
                 pass
             text.tag_remove("sel", "1.0", "end")
             text.tag_add("sel", first, last)
             text.mark_set("insert", self.engine.isback() and first or last)
             text.see("insert")
-            return 1
+            return True
         else:
             text.bell()
-            return 0
+            return False
 
     def find_selection(self, text):
         pat = text.get("sel.first", "sel.last")