]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Whitespace normalization.
authorTim Peters <tim.peters@gmail.com>
Mon, 24 Jul 2006 21:02:15 +0000 (21:02 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 24 Jul 2006 21:02:15 +0000 (21:02 +0000)
Lib/idlelib/macosxSupport.py
Lib/test/test_traceback.py
Lib/traceback.py

index 8aea160c8da07e5fe87d3ade1e2353caa4995dd5..ad61fff46f4f3de8ed10f82503227b32f2a3af35 100644 (file)
@@ -30,7 +30,7 @@ def overrideRootMenu(root, flist):
     Replace the Tk root menu by something that's more appropriate for
     IDLE.
     """
-    # The menu that is attached to the Tk root (".") is also used by AquaTk for 
+    # The menu that is attached to the Tk root (".") is also used by AquaTk for
     # all windows that don't specify a menu of their own. The default menubar
     # contains a number of menus, none of which are appropriate for IDLE. The
     # Most annoying of those is an 'About Tck/Tk...' menu in the application
@@ -82,7 +82,7 @@ def overrideRootMenu(root, flist):
 
     for mname, entrylist in Bindings.menudefs:
         menu = menudict.get(mname)
-        if not menu: 
+        if not menu:
             continue
         for entry in entrylist:
             if not entry:
@@ -90,14 +90,14 @@ def overrideRootMenu(root, flist):
             else:
                 label, eventname = entry
                 underline, label = prepstr(label)
-                accelerator = get_accelerator(Bindings.default_keydefs, 
+                accelerator = get_accelerator(Bindings.default_keydefs,
                         eventname)
                 def command(text=root, eventname=eventname):
                     text.event_generate(eventname)
                 menu.add_command(label=label, underline=underline,
                         command=command, accelerator=accelerator)
 
-    
+
 
 
 
index 4ecd2cd109f6c26a24c33f42e171285e2c48c199..7f0ede5b3a0b79c52b390e355fd1e0ac0f3ed425 100644 (file)
@@ -112,7 +112,7 @@ def test():
         self.assertEqual(lst, ['KeyboardInterrupt\n'])
 
     # String exceptions are deprecated, but legal.  The quirky form with
-    # separate "type" and "value" tends to break things, because 
+    # separate "type" and "value" tends to break things, because
     #     not isinstance(value, type)
     # and a string cannot be the first argument to issubclass.
     #
@@ -139,7 +139,7 @@ def test():
         err = traceback.format_exception_only(str_type, str_value)
         self.assert_(len(err) == 1)
         self.assert_(err[0] == str_type + ': ' + str_value + '\n')
-        
+
 
 def test_main():
     run_unittest(TracebackCases)
index f634159e8158855f788cdae0b24d0efceb4e7bc7..a0b57596ef59e6564c6fc7338c5b7377dcb060c5 100644 (file)
@@ -172,7 +172,7 @@ def format_exception_only(etype, value):
         isinstance(etype, types.InstanceType) or
         type(etype) is str):
         return [_format_final_exc_line(etype, value)]
-        
+
     stype = etype.__name__
 
     if not issubclass(etype, SyntaxError):
@@ -196,18 +196,18 @@ def format_exception_only(etype, value):
                 # only three spaces to account for offset1 == pos 0
                 lines.append('   %s^\n' % ''.join(caretspace))
             value = msg
-            
+
     lines.append(_format_final_exc_line(stype, value))
     return lines
 
 def _format_final_exc_line(etype, value):
     """Return a list of a single line -- normal case for format_exception_only"""
-    if value is None or not str(value):   
+    if value is None or not str(value):
         line = "%s\n" % etype
     else:
         line = "%s: %s\n" % (etype, _some_str(value))
     return line
-    
+
 def _some_str(value):
     try:
         return str(value)