mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Some more changes related to the new except syntax and semantics,
by Collin Winter.
This commit is contained in:
parent
b940e113bf
commit
16be03e4a2
10 changed files with 46 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue