[Python-checkins] python/dist/src/Lib textwrap.py, 1.32.8.1, 1.32.8.2 (original) (raw)
gward at users.sourceforge.net gward at users.sourceforge.net
Wed May 12 21:48:18 EDT 2004
- Previous message: [Python-checkins] python/dist/src/Lib/test test_textwrap.py, 1.22.8.1, 1.22.8.2
- Next message: [Python-checkins] python/dist/src/Lib textwrap.py,1.33,1.34
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4211/Lib
Modified Files: Tag: release23-maint textwrap.py Log Message: SF #847346: remove misguided optimization for short input from wrap() method. Premature optimization is indeed the root of all evil. Whitespace fix.
Index: textwrap.py
RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v retrieving revision 1.32.8.1 retrieving revision 1.32.8.2 diff -C2 -d -r1.32.8.1 -r1.32.8.2 *** textwrap.py 30 Aug 2003 14:52:35 -0000 1.32.8.1 --- textwrap.py 13 May 2004 01:48:15 -0000 1.32.8.2
*** 91,102 ****
! def init (self, ! width=70, ! initial_indent="", ! subsequent_indent="", ! expand_tabs=True, ! replace_whitespace=True, ! fix_sentence_endings=False, ! break_long_words=True): self.width = width self.initial_indent = initial_indent --- 91,102 ----
! def init(self, ! width=70, ! initial_indent="", ! subsequent_indent="", ! expand_tabs=True, ! replace_whitespace=True, ! fix_sentence_endings=False, ! break_long_words=True): self.width = width self.initial_indent = initial_indent
*** 269,274 **** text = self._munge_whitespace(text) indent = self.initial_indent
if len(text) + len(indent) <= self.width:
return [indent + text] chunks = self._split(text) if self.fix_sentence_endings:
--- 269,272 ----
- Previous message: [Python-checkins] python/dist/src/Lib/test test_textwrap.py, 1.22.8.1, 1.22.8.2
- Next message: [Python-checkins] python/dist/src/Lib textwrap.py,1.33,1.34
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]