Hi,

I found two small bugs in pydoc.py. The patch is rather simple, so I doubt
I have to explain it. Note, I removed the -*- coding: -*- tag, since
the encoding of pydoc.py is actually utf-8, not Latin-1 (at least, that's
what Emacs told me).

-- Alexandre
Index: Lib/pydoc.py
===================================================================
--- Lib/pydoc.py	(revision 55848)
+++ Lib/pydoc.py	(working copy)
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-# -*- coding: Latin-1 -*-
 """Generate Python documentation in HTML or text for interactive use.
 
 In the Python interpreter, do "from pydoc import help" to provide online
@@ -1750,10 +1749,10 @@
 ''' % sys.version[:3])
 
     def list(self, items, columns=4, width=80):
-        items = items[:]
+        items = list(items)
         items.sort()
-        colw = width / columns
-        rows = (len(items) + columns - 1) / columns
+        colw = width // columns
+        rows = (len(items) + columns - 1) // columns
         for row in range(rows):
             for col in range(columns):
                 i = col * rows + row
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to