From ce333ffbea033715dfad11766b97f7722453079c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 26 May 2011 13:37:25 +0200 Subject: Close #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true) division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve. --- 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 index 8b6f7ee2e3..f11940438c 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -478,9 +478,9 @@ class HTMLDoc(Doc): 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 + '' % (100/cols) + result = result + '' % (100//cols) for i in range(rows*col, rows*col+rows): if i < len(list): result = result + format(list[i]) + '
\n' diff --git a/Misc/ACKS b/Misc/ACKS index 4270934f23..164473f139 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -458,6 +458,7 @@ Hannu Krosing Andrej Krpic Ivan Krstić Andrew Kuchling +Ralf W. Grosse-Kunstleve Vladimir Kushnir Ross Lagerwall Cameron Laird diff --git a/Misc/NEWS b/Misc/NEWS index 0f2049b003..e34bd48619 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -83,6 +83,9 @@ Core and Builtins 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 -- cgit v1.2.1