diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-04-04 22:55:58 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-04-04 22:55:58 (GMT) |
commit | bc0e9108261693b6278687f4fb4709ff76c2e543 (patch) | |
tree | afef5d4734034ed0268950cf06321aefd4154ff3 /Tools/idle/SearchDialog.py | |
parent | 2f486b7fa6451b790b154e6e4751239d69d46952 (diff) | |
download | cpython-bc0e9108261693b6278687f4fb4709ff76c2e543.zip cpython-bc0e9108261693b6278687f4fb4709ff76c2e543.tar.gz cpython-bc0e9108261693b6278687f4fb4709ff76c2e543.tar.bz2 |
Convert a pile of obvious "yes/no" functions to return bool.
Diffstat (limited to 'Tools/idle/SearchDialog.py')
-rw-r--r-- | Tools/idle/SearchDialog.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/idle/SearchDialog.py b/Tools/idle/SearchDialog.py index 0f0cb18..8d275c4 100644 --- a/Tools/idle/SearchDialog.py +++ b/Tools/idle/SearchDialog.py @@ -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") |