summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-11-13 21:17:28 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-11-13 21:17:28 (GMT)
commit7b3d5e177941f910bbf20a9345213b51b7be6a87 (patch)
tree08083828cddb378c17008ed5eb3e7c71bcb58508 /Python
parent7b5a604d247e8446dbcb208ab2b1e231eff1e9cf (diff)
downloadcpython-7b3d5e177941f910bbf20a9345213b51b7be6a87.zip
cpython-7b3d5e177941f910bbf20a9345213b51b7be6a87.tar.gz
cpython-7b3d5e177941f910bbf20a9345213b51b7be6a87.tar.bz2
remove useless debug print helper. fix a couple of exceptions
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Python/ast.c b/Python/ast.c
index e9c1264..e483650 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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 @@ count_list_fors(const node *n)
}
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 @@ count_gen_fors(const node *n)
}
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 @@ ast_for_try_stmt(struct compiling *c, const node *n)
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;
}
}