[Python-checkins] python/dist/src/Lib pydoc.py,1.70,1.71

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sun, 20 Oct 2002 21:44:13 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv22848

Modified Files:
	pydoc.py 
Log Message:
Explicitly use floor division

Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** pydoc.py	26 Sep 2002 21:44:57 -0000	1.70
--- pydoc.py	21 Oct 2002 04:44:11 -0000	1.71
***************
*** 100,104 ****
      """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)
          post = max(0, maxlen-3-pre)
          return text[:pre] + '...' + text[len(text)-post:]
--- 100,104 ----
      """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)
          post = max(0, maxlen-3-pre)
          return text[:pre] + '...' + text[len(text)-post:]