bpo-395222: Correctly unparse unicode prefix in ast_unparse.c (GH-19512)

This commit is contained in:
Batuhan Taşkaya 2020-04-14 21:55:01 +03:00 committed by GitHub
parent 96515e9f67
commit aade1cc453
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -875,6 +875,8 @@ append_ast_expr(_PyUnicodeWriter *writer, expr_ty e, int level)
if (e->v.Constant.value == Py_Ellipsis) {
APPEND_STR_FINISH("...");
}
APPEND_STR_IF(e->v.Constant.kind != NULL,
PyUnicode_AS_DATA(e->v.Constant.kind));
return append_ast_constant(writer, e->v.Constant.value);
case JoinedStr_kind:
return append_joinedstr(writer, e, false);