summaryrefslogtreecommitdiffstats
path: root/Lib/formatter.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 11:10:16 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 11:10:16 (GMT)
commitb08b2d316653bf22d39ad76814b5a0e7dad30c31 (patch)
tree004b23a8a68e8fa951c21aca3da4e71304fafb48 /Lib/formatter.py
parentbe9b507bddf79fc98536dee2feaf05fcd4438196 (diff)
downloadcpython-b08b2d316653bf22d39ad76814b5a0e7dad30c31.zip
cpython-b08b2d316653bf22d39ad76814b5a0e7dad30c31.tar.gz
cpython-b08b2d316653bf22d39ad76814b5a0e7dad30c31.tar.bz2
String method conversion.
Diffstat (limited to 'Lib/formatter.py')
-rw-r--r--Lib/formatter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/formatter.py b/Lib/formatter.py
index 359975b..8393e46 100644
--- a/Lib/formatter.py
+++ b/Lib/formatter.py
@@ -157,7 +157,7 @@ class AbstractFormatter:
label = s + label
index = index + 1
if case == 'I':
- return string.upper(label)
+ return label.upper()
return label
def add_flowing_data(self, data,
@@ -369,11 +369,11 @@ class DumbWriter(NullWriter):
def send_literal_data(self, data):
self.file.write(data)
- i = string.rfind(data, '\n')
+ i = data.rfind('\n')
if i >= 0:
self.col = 0
data = data[i+1:]
- data = string.expandtabs(data)
+ data = data.expandtabs()
self.col = self.col + len(data)
self.atbreak = 0
@@ -383,7 +383,7 @@ class DumbWriter(NullWriter):
col = self.col
maxcol = self.maxcol
write = self.file.write
- for word in string.split(data):
+ for word in data.split():
if atbreak:
if col + len(word) >= maxcol:
write('\n')