diff options
| author | Guido van Rossum <guido@python.org> | 1996-08-08 18:51:04 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1996-08-08 18:51:04 +0000 |
| commit | dbfaa70c38aa1b3b8ed059c7e1dd6e43181454ab (patch) | |
| tree | 9c4ed546010da00f3ce465c3c270001a5bde75f0 /Python/compile.c | |
| parent | 743e95bdcf043ab31530a4b4dcf1065627555014 (diff) | |
| download | cpython-dbfaa70c38aa1b3b8ed059c7e1dd6e43181454ab.tar.gz | |
Removed unused var; added error check for ``lambda: x=1''.
Diffstat (limited to 'Python/compile.c')
| -rw-r--r-- | Python/compile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index f20036b811..cf2d0bba57 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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)); |
