[Python-checkins] commit of r41440 - python/trunk/Python

neal.norwitz@python.org neal.norwitz at python.org
Sun Nov 13 22:17:31 CET 2005


Author: neal.norwitz
Date: Sun Nov 13 22:17:28 2005
New Revision: 41440

Modified:
   python/trunk/Python/ast.c
Log:
remove useless debug print helper.  fix a couple of exceptions

Modified: python/trunk/Python/ast.c
==============================================================================
--- python/trunk/Python/ast.c	(original)
+++ python/trunk/Python/ast.c	Sun Nov 13 22:17:28 2005
@@ -14,10 +14,6 @@
 
 #include <assert.h>
 
-#if 0
-#define fprintf if (0) fprintf
-#endif
-
 /* XXX TO DO
    - re-indent this file (should be done)
    - internal error checking (freeing memory, etc.)
@@ -908,7 +904,7 @@
     }
     else {
         /* Should never be reached */
-        PyErr_SetString(PyExc_Exception, "logic error in count_list_fors");
+        PyErr_SetString(PyExc_SystemError, "logic error in count_list_fors");
         return -1;
     }
 }
@@ -1076,7 +1072,8 @@
 	}
 	else {
 		/* Should never be reached */
-		PyErr_SetString(PyExc_Exception, "logic error in count_gen_fors");
+		PyErr_SetString(PyExc_SystemError,
+				"logic error in count_gen_fors");
 		return -1;
 	}
 }
@@ -2760,7 +2757,7 @@
 	return TryExcept(suite_seq1, handlers, suite_seq2, LINENO(n));
     }
     else {
-        PyErr_SetString(PyExc_Exception, "malformed 'try' statement");
+        ast_error(n, "malformed 'try' statement");
         return NULL;
     }
 }


More information about the Python-checkins mailing list