diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-03-18 17:48:58 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-03-18 17:48:58 (GMT) |
commit | cda75be02a79686a8e634576600814271536bc1a (patch) | |
tree | b456968bae7bcdebceb833e7b13dae163d732d36 /Python/compile.c | |
parent | c45e041bff4a5f9aa137dcd4933c72a9221cd7d5 (diff) | |
download | cpython-cda75be02a79686a8e634576600814271536bc1a.zip cpython-cda75be02a79686a8e634576600814271536bc1a.tar.gz cpython-cda75be02a79686a8e634576600814271536bc1a.tar.bz2 |
unify some ast.argument's attrs; change Attribute column offset (closes #16795)
Patch from Sven Brauch.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/compile.c b/Python/compile.c index 61f35f8..0aca8bd 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1498,15 +1498,15 @@ compiler_visit_annotations(struct compiler *c, arguments_ty args, 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) { |