From: Alexandre Vassalotti Date: Thu, 7 Jun 2007 22:37:45 +0000 (+0000) Subject: Fix pdb help command. X-Git-Tag: v3.0a1~811 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b955bd125951db694f19a1b8648b806b14bd61f;p=python Fix pdb help command. --- diff --git a/Lib/cmd.py b/Lib/cmd.py index e44f55a658..8362edc561 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("\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)))