diff options
author | Raymond Hettinger <python@rcn.com> | 2002-10-21 04:44:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-10-21 04:44:11 (GMT) |
commit | fca3bb6a296f3d6bc9e0c0eea43e7da7051c94e7 (patch) | |
tree | 72b8b9f4dc785d2dd116fb9b7b01191d81c2ead2 /Lib/pydoc.py | |
parent | d058f08e0324e84fec3010f32f4b377bed94e897 (diff) | |
download | cpython-fca3bb6a296f3d6bc9e0c0eea43e7da7051c94e7.zip cpython-fca3bb6a296f3d6bc9e0c0eea43e7da7051c94e7.tar.gz cpython-fca3bb6a296f3d6bc9e0c0eea43e7da7051c94e7.tar.bz2 |
Explicitly use floor division
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index ecee79b..e83e895 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -99,7 +99,7 @@ def replace(text, *pairs): def cram(text, maxlen): """Omit part of a string if needed to make it fit in a maximum length.""" if len(text) > maxlen: - pre = max(0, (maxlen-3)/2) + pre = max(0, (maxlen-3)//2) post = max(0, maxlen-3-pre) return text[:pre] + '...' + text[len(text)-post:] return text |