[Python-checkins] r50809 - in python/trunk/Lib: idlelib/macosxSupport.py test/test_traceback.py traceback.py

tim.peters python-checkins at python.org
Mon Jul 24 23:02:19 CEST 2006


Author: tim.peters
Date: Mon Jul 24 23:02:15 2006
New Revision: 50809

Modified:
   python/trunk/Lib/idlelib/macosxSupport.py
   python/trunk/Lib/test/test_traceback.py
   python/trunk/Lib/traceback.py
Log:
Whitespace normalization.


Modified: python/trunk/Lib/idlelib/macosxSupport.py
==============================================================================
--- python/trunk/Lib/idlelib/macosxSupport.py	(original)
+++ python/trunk/Lib/idlelib/macosxSupport.py	Mon Jul 24 23:02:15 2006
@@ -30,7 +30,7 @@
     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 @@
 
     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 @@
             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)
 
-    
+
 
 
 

Modified: python/trunk/Lib/test/test_traceback.py
==============================================================================
--- python/trunk/Lib/test/test_traceback.py	(original)
+++ python/trunk/Lib/test/test_traceback.py	Mon Jul 24 23:02:15 2006
@@ -112,7 +112,7 @@
         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 @@
         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)

Modified: python/trunk/Lib/traceback.py
==============================================================================
--- python/trunk/Lib/traceback.py	(original)
+++ python/trunk/Lib/traceback.py	Mon Jul 24 23:02:15 2006
@@ -172,7 +172,7 @@
         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 @@
                 # 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)


More information about the Python-checkins mailing list