[Python-checkins] cpython (2.7): Close #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
victor.stinner
python-checkins at python.org
Thu May 26 13:38:41 CEST 2011
http://hg.python.org/cpython/rev/7724b53510c4
changeset: 70395:7724b53510c4
branch: 2.7
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Thu May 26 13:37:25 2011 +0200
summary:
Close #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve.
files:
Lib/pydoc.py | 4 ++--
Misc/ACKS | 1 +
Misc/NEWS | 3 +++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -478,9 +478,9 @@
def multicolumn(self, list, format, cols=4):
"""Format a list of items into a multi-column list."""
result = ''
- rows = (len(list)+cols-1)/cols
+ rows = (len(list)+cols-1)//cols
for col in range(cols):
- result = result + '<td width="%d%%" valign=top>' % (100/cols)
+ result = result + '<td width="%d%%" valign=top>' % (100//cols)
for i in range(rows*col, rows*col+rows):
if i < len(list):
result = result + format(list[i]) + '<br>\n'
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -458,6 +458,7 @@
Andrej Krpic
Ivan Krstić
Andrew Kuchling
+Ralf W. Grosse-Kunstleve
Vladimir Kushnir
Ross Lagerwall
Cameron Laird
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,9 @@
Library
-------
+- Issue #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
+ division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve.
+
- Issue #12175: RawIOBase.readall() now returns None if read() returns None.
- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list