diff options
author | Tim Peters <tim.peters@gmail.com> | 2005-08-26 15:20:46 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2005-08-26 15:20:46 +0000 |
commit | 9e34c047325651853a95f95e538582a4f6d5b7f6 (patch) | |
tree | 97ba789e8889e26e3fd5bd729d01d5e8e2c15d70 /Lib | |
parent | e8889c5741b636aa798757eb5500d304b1704344 (diff) | |
download | cpython-git-9e34c047325651853a95f95e538582a4f6d5b7f6.tar.gz |
Whitespace normalization (via reindent.py).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/dir_util.py | 2 | ||||
-rw-r--r-- | Lib/hashlib.py | 1 | ||||
-rw-r--r-- | Lib/random.py | 2 | ||||
-rw-r--r-- | Lib/test/seq_tests.py | 2 | ||||
-rw-r--r-- | Lib/test/test_generators.py | 6 | ||||
-rw-r--r-- | Lib/test/test_hashlib_speed.py | 1 | ||||
-rw-r--r-- | Lib/test/test_mmap.py | 2 | ||||
-rw-r--r-- | Lib/urllib2.py | 4 |
8 files changed, 9 insertions, 11 deletions
diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 2248b607cf..43994db3ff 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -31,7 +31,7 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0): global _path_created # Detect a common bug -- name is None - if not isinstance(name, StringTypes): + if not isinstance(name, StringTypes): raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) diff --git a/Lib/hashlib.py b/Lib/hashlib.py index 3528699bda..48fc56cf2b 100644 --- a/Lib/hashlib.py +++ b/Lib/hashlib.py @@ -107,4 +107,3 @@ except ImportError: sha256 = __get_builtin_constructor('sha256') sha384 = __get_builtin_constructor('sha384') sha512 = __get_builtin_constructor('sha512') - diff --git a/Lib/random.py b/Lib/random.py index 3e6941e178..b4ad2b38ae 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -303,7 +303,7 @@ class Random(_random.Random): result = [None] * k setsize = 21 # size of a small set minus size of an empty list if k > 5: - setsize += 4 ** _ceil(_log(k * 3, 4)) # table size for big sets + setsize += 4 ** _ceil(_log(k * 3, 4)) # table size for big sets if n <= setsize: # is an n-length list smaller than a k-length set pool = list(population) for i in xrange(k): # invariant: non-selected at [0,n-i) diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py index ae5bba3d6e..18fb3b786d 100644 --- a/Lib/test/seq_tests.py +++ b/Lib/test/seq_tests.py @@ -228,7 +228,7 @@ class CommonTest(unittest.TestCase): class StopCompares: def __eq__(self, other): raise DoNotTestEq - + checkfirst = self.type2test([1, StopCompares()]) self.assert_(1 in checkfirst) checklast = self.type2test([StopCompares(), 1]) diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index fb88ffac0a..d226043ce3 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -709,18 +709,18 @@ are quite straightforwardly expressed with this Python idiom. Ye olde Fibonacci generator, tee style. >>> def fib(): -... +... ... def _isum(g, h): ... while 1: ... yield g.next() + h.next() -... +... ... def _fib(): ... yield 1 ... yield 2 ... fibTail.next() # throw first away ... for res in _isum(fibHead, fibTail): ... yield res -... +... ... fibHead, fibTail, fibRes = tee(_fib(), 3) ... return fibRes diff --git a/Lib/test/test_hashlib_speed.py b/Lib/test/test_hashlib_speed.py index a62d923a73..c84a62bdf3 100644 --- a/Lib/test/test_hashlib_speed.py +++ b/Lib/test/test_hashlib_speed.py @@ -90,4 +90,3 @@ test_scaled_msg(scale=212, name='[2*small data]') test_scaled_msg(scale=106, name='[small data]') test_scaled_msg(scale=creatorFunc().digest_size, name='[digest_size data]') test_scaled_msg(scale=10, name='[tiny data]') - diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index a0386ef005..0b9cea9214 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -126,7 +126,7 @@ def test_both(): f.seek(0, 2) verify(f.tell() == 512, 'Underlying file not truncated') f.close() - verify(m.size() == 512, 'New size not reflected in file') + verify(m.size() == 512, 'New size not reflected in file') m.close() diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 84b4bb3911..015fdb51e8 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -1069,7 +1069,7 @@ def parse_keqv_list(l): def parse_http_list(s): """Parse lists as described by RFC 2068 Section 2. - + In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the @@ -1101,7 +1101,7 @@ def parse_http_list(s): if cur == '"': quote = True - + part += cur # append last part |