mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Removed unused var; added error check for ``lambda: x=1''.
This commit is contained in:
parent
fe4b6ee775
commit
15cc9a0a76
1 changed files with 5 additions and 1 deletions
|
@ -1050,7 +1050,6 @@ com_factor(c, n)
|
|||
struct compiling *c;
|
||||
node *n;
|
||||
{
|
||||
int i;
|
||||
REQ(n, factor);
|
||||
if (TYPE(CHILD(n, 0)) == PLUS) {
|
||||
com_factor(c, CHILD(n, 1));
|
||||
|
@ -1605,6 +1604,11 @@ com_assign(c, n, assigning)
|
|||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case lambdef:
|
||||
err_setstr(SyntaxError, "can't assign to lambda");
|
||||
c->c_errors++;
|
||||
return;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "node type %d\n", TYPE(n));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue