summaryrefslogtreecommitdiffstats
path: root/Tools/idle/IOBinding.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-04 22:55:58 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-04 22:55:58 (GMT)
commitbc0e9108261693b6278687f4fb4709ff76c2e543 (patch)
treeafef5d4734034ed0268950cf06321aefd4154ff3 /Tools/idle/IOBinding.py
parent2f486b7fa6451b790b154e6e4751239d69d46952 (diff)
downloadcpython-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/IOBinding.py')
-rw-r--r--Tools/idle/IOBinding.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/idle/IOBinding.py b/Tools/idle/IOBinding.py
index 5d41d35..dfea0b6 100644
--- a/Tools/idle/IOBinding.py
+++ b/Tools/idle/IOBinding.py
@@ -92,7 +92,7 @@ class IOBinding:
f.close()
except IOError, msg:
tkMessageBox.showerror("I/O Error", str(msg), master=self.text)
- return 0
+ return False
self.text.delete("1.0", "end")
self.set_filename(None)
self.text.insert("1.0", chars)
@@ -100,7 +100,7 @@ class IOBinding:
self.set_filename(filename)
self.text.mark_set("insert", "1.0")
self.text.see("insert")
- return 1
+ return True
def maybesave(self):
if self.get_saved():
@@ -154,11 +154,11 @@ class IOBinding:
f.write(chars)
f.close()
## print "saved to", `filename`
- return 1
+ return True
except IOError, msg:
tkMessageBox.showerror("I/O Error", str(msg),
master=self.text)
- return 0
+ return False
def fixlastline(self):
c = self.text.get("end-2c")