Some more changes related to the new except syntax and semantics,

by Collin Winter.
This commit is contained in:
Guido van Rossum 2007-01-10 18:51:35 +00:00
parent b940e113bf
commit 16be03e4a2
10 changed files with 46 additions and 32 deletions

View file

@ -1836,7 +1836,7 @@ comprehension(expr_ty target, expr_ty iter, asdl_seq * ifs, PyArena *arena)
}
excepthandler_ty
excepthandler(expr_ty type, expr_ty name, asdl_seq * body, int lineno, int
excepthandler(expr_ty type, identifier name, asdl_seq * body, int lineno, int
col_offset, PyArena *arena)
{
excepthandler_ty p;
@ -2928,7 +2928,7 @@ ast2obj_excepthandler(void* _o)
if (PyObject_SetAttrString(result, "type", value) == -1)
goto failed;
Py_DECREF(value);
value = ast2obj_expr(o->name);
value = ast2obj_identifier(o->name);
if (!value) goto failed;
if (PyObject_SetAttrString(result, "name", value) == -1)
goto failed;