From fca3bb6a296f3d6bc9e0c0eea43e7da7051c94e7 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 21 Oct 2002 04:44:11 +0000 Subject: [PATCH] Explicitly use floor division --- Lib/pydoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index ecee79b67d3..e83e8951877 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