summaryrefslogtreecommitdiffstats
path: root/Python/ast_unparse.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-03-11 20:18:01 (GMT)
committerGitHub <noreply@github.com>2020-03-11 20:18:01 (GMT)
commitcd07b4da659cb5e86fe7c856aca866b9db466fce (patch)
treeaa0e858862a61dc0c66405d38941ea406c4e7fd6 /Python/ast_unparse.c
parentc22879914b03ff2da768e557b5c00e9c8c62c695 (diff)
downloadcpython-cd07b4da659cb5e86fe7c856aca866b9db466fce.zip
cpython-cd07b4da659cb5e86fe7c856aca866b9db466fce.tar.gz
cpython-cd07b4da659cb5e86fe7c856aca866b9db466fce.tar.bz2
bpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)
(cherry picked from commit 185903de12de8837bf0dc0008a16e5e56c66a019) Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Diffstat (limited to 'Python/ast_unparse.c')
-rw-r--r--Python/ast_unparse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ast_unparse.c b/Python/ast_unparse.c
index f376e86..1a7cd23 100644
--- a/Python/ast_unparse.c
+++ b/Python/ast_unparse.c
@@ -746,6 +746,7 @@ append_ast_ext_slice(_PyUnicodeWriter *writer, slice_ty slice)
APPEND_STR_IF(i > 0, ", ");
APPEND(slice, (slice_ty)asdl_seq_GET(slice->v.ExtSlice.dims, i));
}
+ APPEND_STR_IF(dims_count == 1, ",");
return 0;
}