summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-03-05 20:42:06 +0200
committerGitHub <noreply@github.com>2019-03-05 20:42:06 +0200
commitd8b3a98c9098c66a714fd5593e1928af0ffbc631 (patch)
treedc9c2290f796ec697adcfa12942f773646f8f13c /Python/compile.c
parentadfffc7343ce7ebc88ec734a803d3247ba8927fb (diff)
downloadcpython-git-d8b3a98c9098c66a714fd5593e1928af0ffbc631.tar.gz
bpo-36187: Remove NamedStore. (GH-12167)
NamedStore has been replaced with Store. The difference between NamedStore and Store is handled when precess the NamedExpr node one level upper.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 18877d96da..c26210675d 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3429,7 +3429,6 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
op = (c->u->u_ste->ste_type == ClassBlock) ? LOAD_CLASSDEREF : LOAD_DEREF;
break;
case Store:
- case NamedStore:
op = STORE_DEREF;
break;
case AugLoad:
@@ -3447,7 +3446,6 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
switch (ctx) {
case Load: op = LOAD_FAST; break;
case Store:
- case NamedStore:
op = STORE_FAST;
break;
case Del: op = DELETE_FAST; break;
@@ -3466,7 +3464,6 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
switch (ctx) {
case Load: op = LOAD_GLOBAL; break;
case Store:
- case NamedStore:
op = STORE_GLOBAL;
break;
case Del: op = DELETE_GLOBAL; break;
@@ -3484,7 +3481,6 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
switch (ctx) {
case Load: op = LOAD_NAME; break;
case Store:
- case NamedStore:
op = STORE_NAME;
break;
case Del: op = DELETE_NAME; break;
@@ -3604,7 +3600,7 @@ static int
compiler_list(struct compiler *c, expr_ty e)
{
asdl_seq *elts = e->v.List.elts;
- if (e->v.List.ctx == Store || e->v.List.ctx == NamedStore) {
+ if (e->v.List.ctx == Store) {
return assignment_helper(c, elts);
}
else if (e->v.List.ctx == Load) {
@@ -3620,7 +3616,7 @@ static int
compiler_tuple(struct compiler *c, expr_ty e)
{
asdl_seq *elts = e->v.Tuple.elts;
- if (e->v.Tuple.ctx == Store || e->v.Tuple.ctx == NamedStore) {
+ if (e->v.Tuple.ctx == Store) {
return assignment_helper(c, elts);
}
else if (e->v.Tuple.ctx == Load) {
@@ -5154,7 +5150,6 @@ compiler_handle_subscr(struct compiler *c, const char *kind,
case AugStore:/* fall through to Store */
case Store: op = STORE_SUBSCR; break;
case Del: op = DELETE_SUBSCR; break;
- case NamedStore:
case Param:
PyErr_Format(PyExc_SystemError,
"invalid %s kind %d in subscript\n",