diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-26 13:37:25 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-26 13:37:25 +0200 |
commit | dbfba1667cce8a4e4b28a1cd1f8772e063c06e49 (patch) | |
tree | 5903424dc8edb25ef071d0f4b61940fdbd8c5a6c /Lib/pydoc.py | |
parent | a5392455f6b632755e568f46ca6492918f1fe779 (diff) | |
download | cpython-git-dbfba1667cce8a4e4b28a1cd1f8772e063c06e49.tar.gz |
Close #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 2 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 + '<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' |