diff --git a/Lib/socket.py b/Lib/socket.py
index 7cd7889..d0f0911 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -63,7 +63,7 @@
         def ssl(sock, keyfile=None, certfile=None):
             if hasattr(sock, "_sock"):
                 sock = sock._sock
-            return _realsslcall(sock, keyfile, certfile)    
+            return _realsslcall(sock, keyfile, certfile)
 
 
 # WSA error codes
diff --git a/Lib/symtable.py b/Lib/symtable.py
index 6401d51..135cd56 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -34,7 +34,7 @@
         return obj
 
 newSymbolTable = SymbolTableFactory()
-    
+
 def bool(x):
     """Helper to force boolean result to 1 or 0"""
     if x:
@@ -60,7 +60,7 @@
             kind = ""
         else:
             kind = "%s " % self.__class__.__name__
-        
+
         if self._table.name == "global":
             return "<%sSymbolTable for module %s>" % (kind, self._filename)
         else:
@@ -143,7 +143,7 @@
         if self.__locals is None:
             self.__locals = self.__idents_matching(lambda x:x & DEF_BOUND)
         return self.__locals
-        
+
     def get_globals(self):
         if self.__globals is None:
             glob = DEF_GLOBAL | DEF_FREE_GLOBAL
@@ -186,7 +186,7 @@
         return bool(self.__flags & DEF_PARAM)
 
     def is_global(self):
-        return bool((self.__flags & DEF_GLOBAL) 
+        return bool((self.__flags & DEF_GLOBAL)
                     or (self.__flags & DEF_FREE_GLOBAL))
 
     def is_vararg(self):
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
index 9b95754..b119f62 100644
--- a/Lib/test/test_pty.py
+++ b/Lib/test/test_pty.py
@@ -60,7 +60,7 @@
         os._exit(3)
 
     # After pty.fork(), the child should already be a session leader.
-    # (on those systems that have that concept.) 
+    # (on those systems that have that concept.)
     debug("In child, calling os.setsid()")
     try:
         os.setsid()
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 8da74f5..50b8b36 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -10,12 +10,12 @@
     zip.write(srcname, "another.name")
     zip.write(srcname, srcname)
     zip.close()
-            
+
     zip = zipfile.ZipFile(f, "r", compression)   # Read the ZIP archive
     readData2 = zip.read(srcname)
     readData1 = zip.read("another.name")
     zip.close()
-    
+
     if readData1 != srccontents or readData2 != srccontents:
         raise TestFailed, "Written data doesn't equal read data."
 
@@ -25,11 +25,11 @@
     for i in range(0, 1000):
         fp.write("Test of zipfile line %d.\n" % i)
     fp.close()
-    
+
     fp = open(srcname, "rb")
     writtenData = fp.read()
     fp.close()
-    
+
     for file in (zipname, tempfile.TemporaryFile(), StringIO.StringIO()):
         zipTest(file, zipfile.ZIP_STORED, writtenData)
 
diff --git a/Lib/traceback.py b/Lib/traceback.py
index 82906a3..a758349 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -221,7 +221,7 @@
 
 def print_stack(f=None, limit=None, file=None):
     """Print a stack trace from its invocation point.
-    
+
     The optional 'f' argument can be used to specify an alternate
     stack frame at which to start. The optional 'limit' and 'file'
     arguments have the same meaning as for print_exception().
diff --git a/Lib/unittest.py b/Lib/unittest.py
index 850c38e..eac5e78 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -103,7 +103,7 @@
     def stop(self):
         "Indicates that the tests should be aborted"
         self.shouldStop = 1
-    
+
     def __repr__(self):
         return "<%s run=%i errors=%i failures=%i>" % \
                (self.__class__, self.testsRun, len(self.errors),
@@ -116,12 +116,12 @@
     By default, the test code itself should be placed in a method named
     'runTest'.
 
-    If the fixture may be used for many test cases, create as 
+    If the fixture may be used for many test cases, create as
     many test methods as are needed. When instantiating such a TestCase
     subclass, specify in the constructor arguments the name of the test method
     that the instance is to execute.
 
-    Test authors should subclass TestCase for their own tests. Construction 
+    Test authors should subclass TestCase for their own tests. Construction
     and deconstruction of the test's environment ('fixture') can be
     implemented by overriding the 'setUp' and 'tearDown' methods respectively.
 
@@ -480,7 +480,7 @@
     def writeln(self, *args):
         if args: apply(self.write, args)
         self.write('\n') # text-mode streams translate to \r\n if needed
- 
+
 
 class _TextTestResult(TestResult):
     """A test result class that can print formatted text results to a stream.
@@ -550,7 +550,7 @@
 
 class TextTestRunner:
     """A test runner class that displays results in textual form.
-    
+
     It prints out the names of tests as they are run, errors as they
     occur, and a summary of the results at the end of the test run.
     """
@@ -587,7 +587,7 @@
         else:
             self.stream.writeln("OK")
         return result
-        
+
 
 
 ##############################################################################
@@ -668,7 +668,7 @@
         if self.testRunner is None:
             self.testRunner = TextTestRunner(verbosity=self.verbosity)
         result = self.testRunner.run(self.test)
-        sys.exit(not result.wasSuccessful())    
+        sys.exit(not result.wasSuccessful())
 
 main = TestProgram
 
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index bf59043..b638592 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -131,10 +131,10 @@
 
 
 class ZipFile:
-    """ Class with methods to open, read, write, close, list zip files. 
-     
+    """ Class with methods to open, read, write, close, list zip files.
+
     z = ZipFile(file, mode="r", compression=ZIP_STORED)
-     
+
     file: Either the path to the file, or a file-like object.
           If it is a path, the file will be opened and closed by ZipFile.
     mode: The mode can be either read "r", write "w" or append "a".
@@ -158,7 +158,7 @@
         self.filelist = []      # List of ZipInfo instances for archive
         self.compression = compression  # Method of compression
         self.mode = key = mode[0]
-        
+
         # Check if we were passed a file-like object
         if type(file) in _STRING_TYPES:
             self._filePassed = 0
@@ -169,7 +169,7 @@
             self._filePassed = 1
             self.fp = file
             self.filename = getattr(file, 'name', None)
-        
+
         if key == 'r':
             self._GetContents()
         elif key == 'w':
