summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-05-31 14:19:50 (GMT)
committerGitHub <noreply@github.com>2019-05-31 14:19:50 (GMT)
commita0c01bf1364f2996bb0186ddfc41d74350e01c39 (patch)
tree4f106cd74ed51b8e4a0fbb26acd4a76925ab0e6e /Python/compile.c
parent2f58a84104ef64f71deb71d264305bcd73e59c97 (diff)
downloadcpython-a0c01bf1364f2996bb0186ddfc41d74350e01c39.zip
cpython-a0c01bf1364f2996bb0186ddfc41d74350e01c39.tar.gz
cpython-a0c01bf1364f2996bb0186ddfc41d74350e01c39.tar.bz2
bpo-37115: Support annotations in positional-only arguments (GH-13698)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index f1c97bd..f6ec929 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1991,6 +1991,8 @@ compiler_visit_annotations(struct compiler *c, arguments_ty args,
if (!compiler_visit_argannotations(c, args->args, names))
goto error;
+ if (!compiler_visit_argannotations(c, args->posonlyargs, names))
+ goto error;
if (args->vararg && args->vararg->annotation &&
!compiler_visit_argannotation(c, args->vararg->arg,
args->vararg->annotation, names))