summaryrefslogtreecommitdiffstats
path: root/Lib/code.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 /Lib/code.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 'Lib/code.py')
-rw-r--r--Lib/code.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/code.py b/Lib/code.py
index b7a5af9..75c64e6 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -66,7 +66,7 @@ class InteractiveInterpreter:
object. The code is executed by calling self.runcode() (which
also handles run-time exceptions, except for SystemExit).
- The return value is 1 in case 2, 0 in the other cases (unless
+ The return value is True in case 2, False in the other cases (unless
an exception is raised). The return value can be used to
decide whether to use sys.ps1 or sys.ps2 to prompt the next
line.
@@ -77,15 +77,15 @@ class InteractiveInterpreter:
except (OverflowError, SyntaxError, ValueError):
# Case 1
self.showsyntaxerror(filename)
- return 0
+ return False
if code is None:
# Case 2
- return 1
+ return True
# Case 3
self.runcode(code)
- return 0
+ return False
def runcode(self, code):
"""Execute a code object.