summaryrefslogtreecommitdiffstats
path: root/Lib/tabnanny.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/tabnanny.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/tabnanny.py')
-rwxr-xr-xLib/tabnanny.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py
index 7d2ca52..2595540 100755
--- a/Lib/tabnanny.py
+++ b/Lib/tabnanny.py
@@ -196,7 +196,7 @@ class Whitespace:
other.indent_level(ts)) )
return a
- # Return true iff self.indent_level(t) < other.indent_level(t)
+ # Return True iff self.indent_level(t) < other.indent_level(t)
# for all t >= 1.
# The algorithm is due to Vincent Broman.
# Easy to prove it's correct.
@@ -211,7 +211,7 @@ class Whitespace:
# Note that M is of the form (T*)(S*) iff len(M.norm[0]) <= 1.
def less(self, other):
if self.n >= other.n:
- return 0
+ return False
if self.is_simple and other.is_simple:
return self.nt <= other.nt
n = max(self.longest_run_of_spaces(),
@@ -219,8 +219,8 @@ class Whitespace:
# the self.n >= other.n test already did it for ts=1
for ts in range(2, n+1):
if self.indent_level(ts) >= other.indent_level(ts):
- return 0
- return 1
+ return False
+ return True
# return a list of tuples (ts, i1, i2) such that
# i1 == self.indent_level(ts) >= other.indent_level(ts) == i2.