summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/SearchDialog.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2002-09-18 03:10:10 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2002-09-18 03:10:10 (GMT)
commit0f4402dcf724fc33c62a03f2dc72912f45dffb7e (patch)
treea67a7d3d9c93bb17ee8f6817bd57c2b2f528d530 /Lib/idlelib/SearchDialog.py
parent05bab1ee938f4afacbbd43a9bd21578382fe4717 (diff)
downloadcpython-0f4402dcf724fc33c62a03f2dc72912f45dffb7e.zip
cpython-0f4402dcf724fc33c62a03f2dc72912f45dffb7e.tar.gz
cpython-0f4402dcf724fc33c62a03f2dc72912f45dffb7e.tar.bz2
Merge Py Idle changes:
Rev 1.3 tim_one Convert a pile of obvious "yes/no" functions to return bool.
Diffstat (limited to 'Lib/idlelib/SearchDialog.py')
-rw-r--r--Lib/idlelib/SearchDialog.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py
index 0f0cb18..8d275c4 100644
--- a/Lib/idlelib/SearchDialog.py
+++ b/Lib/idlelib/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")