[Python-3000-checkins] r56127 - python/branches/p3yk/Lib/pydoc.py
georg.brandl
python-3000-checkins at python.org
Sat Jun 30 09:32:49 CEST 2007
Author: georg.brandl
Date: Sat Jun 30 09:32:49 2007
New Revision: 56127
Modified:
python/branches/p3yk/Lib/pydoc.py
Log:
Fix a place where floor division would be in order.
Modified: python/branches/p3yk/Lib/pydoc.py
==============================================================================
--- python/branches/p3yk/Lib/pydoc.py (original)
+++ python/branches/p3yk/Lib/pydoc.py Sat Jun 30 09:32:49 2007
@@ -470,9 +470,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'
More information about the Python-3000-checkins
mailing list