summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-29 23:54:08 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-29 23:54:08 (GMT)
commitfec0c466ad17cc0dfa115ce3ba17a6011e3391d6 (patch)
tree59dfc18b950eba2df6dc1f8b7301dc435ee41cfb /Python/compile.c
parent8ffc1410e28ade7bfe247fd12aac648a7738c0c8 (diff)
downloadcpython-fec0c466ad17cc0dfa115ce3ba17a6011e3391d6.zip
cpython-fec0c466ad17cc0dfa115ce3ba17a6011e3391d6.tar.gz
cpython-fec0c466ad17cc0dfa115ce3ba17a6011e3391d6.tar.bz2
Improve error message for augmented assignments to genexps or listcomps.
Rather than introduce new logic, took the approach of making the message itself more general.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 24ca440..dc636c0 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3274,7 +3274,7 @@ com_assign(struct compiling *c, node *n, int assigning, node *augn)
}
if (assigning > OP_APPLY) {
com_error(c, PyExc_SyntaxError,
- "augmented assign to tuple literal not possible");
+ "augmented assign to tuple literal or generator expression not possible");
return;
}
break;
@@ -3287,7 +3287,7 @@ com_assign(struct compiling *c, node *n, int assigning, node *augn)
}
if (assigning > OP_APPLY) {
com_error(c, PyExc_SyntaxError,
- "augmented assign to list literal not possible");
+ "augmented assign to list literal or comprehension not possible");
return;
}
if (NCH(n) > 1