There was an error while loading. Please reload this page.
1 parent c545e5f commit 9b8b22dCopy full SHA for 9b8b22d
1 file changed
Parser/pegen/pegen.c
@@ -2107,12 +2107,12 @@ _PyPegen_nonparen_genexp_in_call(Parser *p, expr_ty args)
2107
/* The rule that calls this function is 'args for_if_clauses'.
2108
For the input f(L, x for x in y), L and x are in args and
2109
the for is parsed as a for_if_clause. We have to check if
2110
- len == 1, so that input like dict((a, b) for a, b in x)
+ len <= 1, so that input like dict((a, b) for a, b in x)
2111
gets successfully parsed and then we pass the last
2112
argument (x in the above example) as the location of the
2113
error */
2114
Py_ssize_t len = asdl_seq_LEN(args->v.Call.args);
2115
- if (len == 1) {
+ if (len <= 1) {
2116
return NULL;
2117
}
2118
0 commit comments