bpo-47212: Improve error messages for un-parenthesized generator expressions (GH-32302)

This commit is contained in:
Matthieu Dartiailh 2022-04-05 15:47:13 +02:00 committed by GitHub
parent f1606a5ba5
commit aa0f056a00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 8 deletions

View file

@ -1145,7 +1145,7 @@ _PyPegen_get_expr_name(expr_ty e)
}
}
static inline expr_ty
expr_ty
_PyPegen_get_last_comprehension_item(comprehension_ty comprehension) {
if (comprehension->ifs == NULL || asdl_seq_LEN(comprehension->ifs) == 0) {
return comprehension->iter;