[Python-3000-checkins] r55817 - python/branches/py3k-struni/Lib/cmd.py

alexandre.vassalotti python-3000-checkins at python.org
Fri Jun 8 00:37:49 CEST 2007


Author: alexandre.vassalotti
Date: Fri Jun  8 00:37:45 2007
New Revision: 55817

Modified:
   python/branches/py3k-struni/Lib/cmd.py
Log:
Fix pdb help command.


Modified: python/branches/py3k-struni/Lib/cmd.py
==============================================================================
--- python/branches/py3k-struni/Lib/cmd.py	(original)
+++ python/branches/py3k-struni/Lib/cmd.py	Fri Jun  8 00:37:45 2007
@@ -334,7 +334,7 @@
                         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 @@
         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)))


More information about the Python-3000-checkins mailing list