Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b59290f

Browse files
committed
Fix allowable node-types for assignment, need to add 'listmaker'.
(This fix is a bit broken, just as the test already was: the test for testlist and listmaker are done always, whereas the test for exprlist and the actual abort() are only done if Py_DEBUG is defined. Suggestions welcome, I guess ;)
1 parent dfca4dc commit b59290f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1959,7 +1959,7 @@ static void
19591959
com_assign_sequence(struct compiling *c, node *n, int assigning)
19601960
{
19611961
int i;
1962-
if (TYPE(n) != testlist)
1962+
if (TYPE(n) != testlist && TYPE(n) != listmaker)
19631963
REQ(n, exprlist);
19641964
if (assigning) {
19651965
i = (NCH(n)+1)/2;

0 commit comments

Comments
 (0)