Whitespace normalization.

This commit is contained in:
Tim Peters 2005-03-28 01:08:02 +00:00
parent 700f36c752
commit eba28bea9b
14 changed files with 28 additions and 30 deletions

View File

@ -147,12 +147,12 @@ class MutableString(UserString):
raise TypeError, "unhashable type (it is mutable)"
def __setitem__(self, index, sub):
if index < 0:
index += len(self.data)
index += len(self.data)
if index < 0 or index >= len(self.data): raise IndexError
self.data = self.data[:index] + sub + self.data[index+1:]
def __delitem__(self, index):
if index < 0:
index += len(self.data)
index += len(self.data)
if index < 0 or index >= len(self.data): raise IndexError
self.data = self.data[:index] + self.data[index+1:]
def __setslice__(self, start, end, sub):

View File

@ -164,4 +164,3 @@ class upload(Command):
log.ERROR)
if self.show_response:
print '-'*75, r.read(), '-'*75

View File

@ -6,4 +6,4 @@ import distutils.versionpredicate
import doctest
def test_suite():
return doctest.DocTestSuite(distutils.versionpredicate)
return doctest.DocTestSuite(distutils.versionpredicate)

View File

@ -101,10 +101,10 @@ class VersionPredicate:
versionPredicateStr = versionPredicateStr.strip()
if not versionPredicateStr:
raise ValueError("empty package restriction")
raise ValueError("empty package restriction")
match = re_validPackage.match(versionPredicateStr)
if not match:
raise ValueError("bad package name in %r" % versionPredicateStr)
raise ValueError("bad package name in %r" % versionPredicateStr)
self.name, paren = match.groups()
paren = paren.strip()
if paren:

View File

@ -333,8 +333,8 @@ class GzipFile:
def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH):
if self.mode == WRITE:
# Ensure the compressor's buffer is flushed
self.fileobj.write(self.compress.flush(zlib_mode))
# Ensure the compressor's buffer is flushed
self.fileobj.write(self.compress.flush(zlib_mode))
self.fileobj.flush()
def fileno(self):

View File

@ -1,4 +1,3 @@
import xdrlib
xdrlib._test()