Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 82732:7c5c678e4164
unify some ast.argument's attrs; change Attribute column offset (closes #16795)
Patch from Sven Brauch.
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 18 Mar 2013 10:48:58 -0700 |
| parents | 6917402c6191 |
| children | 6e7c6c06f3ba |
line wrap: on
line diff
--- a/Python/compile.c Mon Mar 18 10:10:08 2013 -0700 +++ b/Python/compile.c Mon Mar 18 10:48:58 2013 -0700 @@ -1498,15 +1498,15 @@ if (compiler_visit_argannotations(c, args->args, names)) goto error; - if (args->varargannotation && - compiler_visit_argannotation(c, args->vararg, - args->varargannotation, names)) + if (args->vararg && args->vararg->annotation && + compiler_visit_argannotation(c, args->vararg->arg, + args->vararg->annotation, names)) goto error; if (compiler_visit_argannotations(c, args->kwonlyargs, names)) goto error; - if (args->kwargannotation && - compiler_visit_argannotation(c, args->kwarg, - args->kwargannotation, names)) + if (args->kwarg && args->kwarg->annotation && + compiler_visit_argannotation(c, args->kwarg->arg, + args->kwarg->annotation, names)) goto error; if (!return_str) {
