summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-04-07 06:36:23 (GMT)
committerGuido van Rossum <guido@python.org>2002-04-07 06:36:23 (GMT)
commit8ca162f417c6a72faf02831457b4054a73087b78 (patch)
tree2d882f9a1fe596830f47f1132a5294633ba05f33 /Lib/pydoc.py
parentb8bff3f4a9e3be8b43a394d3795a46af2831fe5e (diff)
downloadcpython-8ca162f417c6a72faf02831457b4054a73087b78.zip
cpython-8ca162f417c6a72faf02831457b4054a73087b78.tar.gz
cpython-8ca162f417c6a72faf02831457b4054a73087b78.tar.bz2
Partial introduction of bools where appropriate.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 587a24c..de6fc63 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -443,7 +443,7 @@ TT { font-family: lucidatypewriter, lucida console, courier }
r'RFC[- ]?(\d+)|'
r'PEP[- ]?(\d+)|'
r'(self\.)?(\w+))')
- while 1:
+ while True:
match = pattern.search(text, here)
if not match: break
start, end = match.span()
@@ -1521,7 +1521,7 @@ has the same effect as typing a particular string at the help> prompt.
def interact(self):
self.output.write('\n')
- while 1:
+ while True:
self.output.write('help> ')
self.output.flush()
try:
@@ -1710,10 +1710,11 @@ class ModuleScanner(Scanner):
if not (os.path.islink(dir) and inode in self.inodes):
self.inodes.append(inode) # detect circular symbolic links
return ispackage(dir)
+ return False
def run(self, callback, key=None, completer=None):
if key: key = lower(key)
- self.quit = 0
+ self.quit = False
seen = {}
for modname in sys.builtin_module_names:
@@ -1825,7 +1826,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>'''
def serve_until_quit(self):
import select
- self.quit = 0
+ self.quit = False
while not self.quit:
rd, wr, ex = select.select([self.socket.fileno()], [], [], 1)
if rd: self.handle_request()