[Python-checkins] python/dist/src/Lib textwrap.py,1.27,1.28
gward@users.sourceforge.net
gward@users.sourceforge.net
Wed, 07 May 2003 19:02:53 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv1561
Modified Files:
textwrap.py
Log Message:
Minor clarification of dedent().
Index: textwrap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** textwrap.py 8 May 2003 01:58:05 -0000 1.27
--- textwrap.py 8 May 2003 02:02:50 -0000 1.28
***************
*** 335,342 ****
margin = None
for line in lines:
! content = len(line.lstrip())
if not content:
continue
! indent = len(line) - content
if margin is None:
margin = indent
--- 335,342 ----
margin = None
for line in lines:
! content = line.lstrip()
if not content:
continue
! indent = len(line) - len(content)
if margin is None:
margin = indent
***************
*** 344,348 ****
margin = min(margin, indent)
! if margin is not None:
for i in range(len(lines)):
lines[i] = lines[i][margin:]
--- 344,348 ----
margin = min(margin, indent)
! if margin is not None and margin > 0:
for i in range(len(lines)):
lines[i] = lines[i][margin:]