From: Raymond Hettinger Date: Mon, 21 Oct 2002 04:44:11 +0000 (+0000) Subject: Explicitly use floor division X-Git-Tag: v2.3c1~3712 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fca3bb6a296f3d6bc9e0c0eea43e7da7051c94e7;p=python Explicitly use floor division --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index ecee79b67d..e83e895187 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