summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-11-09 05:08:07 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-11-09 05:08:07 (GMT)
commit230a60c6ec4861342278fb4546ebc907baf3b23b (patch)
tree00135e543b64638036efcacdc9d5dbfde7988959 /Lib
parentb0ead4ea4a1e0f4e5dc2a00110be8038586c9e21 (diff)
downloadcpython-230a60c6ec4861342278fb4546ebc907baf3b23b.zip
cpython-230a60c6ec4861342278fb4546ebc907baf3b23b.tar.gz
cpython-230a60c6ec4861342278fb4546ebc907baf3b23b.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ConfigParser.py2
-rw-r--r--Lib/httplib.py4
-rw-r--r--Lib/locale.py4
-rw-r--r--Lib/posixpath.py1
-rw-r--r--Lib/site.py2
-rw-r--r--Lib/telnetlib.py10
-rw-r--r--Lib/test/test_bz2.py32
7 files changed, 27 insertions, 28 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 176f2ff..f51d134 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -525,7 +525,7 @@ class ConfigParser(RawConfigParser):
def _interpolate(self, section, option, rawval, vars):
# do the string interpolation
value = rawval
- depth = MAX_INTERPOLATION_DEPTH
+ depth = MAX_INTERPOLATION_DEPTH
while depth: # Loop through this until it's done
depth -= 1
if value.find("%(") != -1:
diff --git a/Lib/httplib.py b/Lib/httplib.py
index e6dc898..077fb25 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -371,7 +371,7 @@ class HTTPResponse:
if self.chunked:
return self._read_chunked(amt)
-
+
if amt is None:
# unbounded read
if self.will_close:
@@ -441,7 +441,7 @@ class HTTPResponse:
self.close()
return value
-
+
def _safe_read(self, amt):
"""Read the number of bytes requested, compensating for partial reads.
diff --git a/Lib/locale.py b/Lib/locale.py
index 8a26744..3551261 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -272,7 +272,7 @@ def _parse_localename(localename):
# since some systems may use other encodings for these
# locales. Also, we ignore other modifiers.
return code, 'iso-8859-15'
-
+
if '.' in code:
return code.split('.')[:2]
elif code == 'C':
@@ -420,7 +420,7 @@ else:
return result
else:
return nl_langinfo(CODESET)
-
+
### Database
#
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index bf15390..6a0640d 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -411,4 +411,3 @@ symbolic links encountered in the path."""
return filename
supports_unicode_filenames = False
-
diff --git a/Lib/site.py b/Lib/site.py
index 0d1ea39..a672765 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -94,7 +94,7 @@ del dir, dircase, L
# (especially for Guido :-)
# XXX This should not be part of site.py, since it is needed even when
# using the -S option for Python. See http://www.python.org/sf/586680
-if (os.name == "posix" and sys.path and
+if (os.name == "posix" and sys.path and
os.path.basename(sys.path[-1]) == "Modules"):
from distutils.util import get_platform
s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 18391e5..4d03861 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -399,12 +399,12 @@ class Telnet:
if not buf and self.eof and not self.rawq:
raise EOFError, 'telnet connection closed'
return buf
-
+
def read_sb_data(self):
"""Return any data available in the SB ... SE queue.
- Return '' if no SB ... SE available. Should only be called
- after seeing a SB or SE command. When a new SB command is
+ Return '' if no SB ... SE available. Should only be called
+ after seeing a SB or SE command. When a new SB command is
found, old unread SB data will be discarded. Don't block.
"""
@@ -442,7 +442,7 @@ class Telnet:
if c in (DO, DONT, WILL, WONT):
self.iacseq += c
continue
-
+
self.iacseq = ''
if c == IAC:
buf[self.sb] = buf[self.sb] + c
@@ -468,7 +468,7 @@ class Telnet:
self.iacseq = ''
opt = c
if cmd in (DO, DONT):
- self.msg('IAC %s %d',
+ self.msg('IAC %s %d',
cmd == DO and 'DO' or 'DONT', ord(opt))
if self.option_callback:
self.option_callback(self.sock, cmd, opt)
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index 79ccf24..7370726 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -28,11 +28,11 @@ class BZ2FileTest(BaseTest):
def setUp(self):
self.filename = tempfile.mktemp("bz2")
-
+
def tearDown(self):
if os.path.isfile(self.filename):
os.unlink(self.filename)
-
+
def createTempFile(self, crlf=0):
f = open(self.filename, "wb")
if crlf:
@@ -41,14 +41,14 @@ class BZ2FileTest(BaseTest):
data = self.DATA
f.write(data)
f.close()
-
+
def testRead(self):
"Test BZ2File.read()"
self.createTempFile()
bz2f = BZ2File(self.filename)
self.assertEqual(bz2f.read(), self.TEXT)
bz2f.close()
-
+
def testReadChunk10(self):
"Test BZ2File.read() in chunks of 10 bytes"
self.createTempFile()
@@ -61,14 +61,14 @@ class BZ2FileTest(BaseTest):
text += str
self.assertEqual(text, text)
bz2f.close()
-
+
def testRead100(self):
"Test BZ2File.read(100)"
self.createTempFile()
bz2f = BZ2File(self.filename)
self.assertEqual(bz2f.read(100), self.TEXT[:100])
bz2f.close()
-
+
def testReadLine(self):
"Test BZ2File.readline()"
self.createTempFile()
@@ -77,7 +77,7 @@ class BZ2FileTest(BaseTest):
for line in sio.readlines():
self.assertEqual(bz2f.readline(), line)
bz2f.close()
-
+
def testReadLines(self):
"Test BZ2File.readlines()"
self.createTempFile()
@@ -85,7 +85,7 @@ class BZ2FileTest(BaseTest):
sio = StringIO(self.TEXT)
self.assertEqual(bz2f.readlines(), sio.readlines())
bz2f.close()
-
+
def testIterator(self):
"Test iter(BZ2File)"
self.createTempFile()
@@ -93,7 +93,7 @@ class BZ2FileTest(BaseTest):
sio = StringIO(self.TEXT)
self.assertEqual(list(iter(bz2f)), sio.readlines())
bz2f.close()
-
+
def testXReadLines(self):
"Test BZ2File.xreadlines()"
self.createTempFile()
@@ -101,7 +101,7 @@ class BZ2FileTest(BaseTest):
sio = StringIO(self.TEXT)
self.assertEqual(list(bz2f.xreadlines()), sio.readlines())
bz2f.close()
-
+
def testUniversalNewlinesLF(self):
"Test BZ2File.read() with universal newlines (\\n)"
self.createTempFile()
@@ -109,7 +109,7 @@ class BZ2FileTest(BaseTest):
self.assertEqual(bz2f.read(), self.TEXT)
self.assertEqual(bz2f.newlines, "\n")
bz2f.close()
-
+
def testUniversalNewlinesCRLF(self):
"Test BZ2File.read() with universal newlines (\\r\\n)"
self.createTempFile(crlf=1)
@@ -117,7 +117,7 @@ class BZ2FileTest(BaseTest):
self.assertEqual(bz2f.read(), self.TEXT)
self.assertEqual(bz2f.newlines, "\r\n")
bz2f.close()
-
+
def testWrite(self):
"Test BZ2File.write()"
bz2f = BZ2File(self.filename, "w")
@@ -151,7 +151,7 @@ class BZ2FileTest(BaseTest):
f = open(self.filename)
self.assertEqual(self.decompress(f.read()), self.TEXT)
f.close()
-
+
def testSeekForward(self):
"Test BZ2File.seek(150, 0)"
self.createTempFile()
@@ -173,7 +173,7 @@ class BZ2FileTest(BaseTest):
bz2f = BZ2File(self.filename)
bz2f.seek(-150, 2)
self.assertEqual(bz2f.read(), self.TEXT[len(self.TEXT)-150:])
-
+
def testSeekPostEnd(self):
"Test BZ2File.seek(150000)"
self.createTempFile()
@@ -258,7 +258,7 @@ class BZ2DecompressorTest(BaseTest):
class FuncTest(BaseTest):
"Test module functions"
-
+
def testCompress(self):
"Test compress() function"
data = compress(self.TEXT)
@@ -268,7 +268,7 @@ class FuncTest(BaseTest):
"Test decompress() function"
text = decompress(self.DATA)
self.assertEqual(text, self.TEXT)
-
+
def testDecompressEmpty(self):
"Test decompress() function with empty string"
text = decompress("")