summaryrefslogtreecommitdiffstats
path: root/Lib/cmd.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2007-06-07 22:37:45 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2007-06-07 22:37:45 (GMT)
commit7b955bd125951db694f19a1b8648b806b14bd61f (patch)
treeef52b2630416dcab18eecdfe2d3f7982ca690af1 /Lib/cmd.py
parent46a05a7db5a65ebee04a43e0394672a72b37ffa1 (diff)
downloadcpython-7b955bd125951db694f19a1b8648b806b14bd61f.zip
cpython-7b955bd125951db694f19a1b8648b806b14bd61f.tar.gz
cpython-7b955bd125951db694f19a1b8648b806b14bd61f.tar.bz2
Fix pdb help command.
Diffstat (limited to 'Lib/cmd.py')
-rw-r--r--Lib/cmd.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/cmd.py b/Lib/cmd.py
index e44f55a..8362edc 100644
--- a/Lib/cmd.py
+++ b/Lib/cmd.py
@@ -334,7 +334,7 @@ class Cmd:
cmds_undoc.append(cmd)
self.stdout.write("%s\n"%str(self.doc_leader))
self.print_topics(self.doc_header, cmds_doc, 15,80)
- self.print_topics(self.misc_header, help.keys(),15,80)
+ self.print_topics(self.misc_header, list(help.keys()),15,80)
self.print_topics(self.undoc_header, cmds_undoc, 15,80)
def print_topics(self, header, cmds, cmdlen, maxcol):
@@ -354,8 +354,9 @@ class Cmd:
if not list:
self.stdout.write("<empty>\n")
return
+
nonstrings = [i for i in range(len(list))
- if not isinstance(list[i], str)]
+ if not isinstance(list[i], basestring)]
if nonstrings:
raise TypeError, ("list[i] not a string for i in %s" %
", ".join(map(str, nonstrings)))