summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-08 18:51:04 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-08 18:51:04 (GMT)
commit15cc9a0a76acb66e2d0c717f13fba142986764b1 (patch)
tree52f1890adb3141e3bf93cdcc2a717661a7c75207 /Python
parentfe4b6ee77596320353bca3d9f1143d6ed97476f3 (diff)
downloadcpython-15cc9a0a76acb66e2d0c717f13fba142986764b1.zip
cpython-15cc9a0a76acb66e2d0c717f13fba142986764b1.tar.gz
cpython-15cc9a0a76acb66e2d0c717f13fba142986764b1.tar.bz2
Removed unused var; added error check for ``lambda: x=1''.
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index f20036b..cf2d0bb 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));