bpo-39969: Remove ast.Param node class as is no longer used (GH-19020)
diff --git a/Python/compile.c b/Python/compile.c
index b92cb44..dd14023 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3579,10 +3579,10 @@
case AugStore:
break;
case Del: op = DELETE_DEREF; break;
- case Param:
default:
- PyErr_SetString(PyExc_SystemError,
- "param invalid for deref variable");
+ PyErr_Format(PyExc_SystemError,
+ "expr_context kind %d should not be possible",
+ ctx);
return 0;
}
break;
@@ -3596,10 +3596,10 @@
case AugLoad:
case AugStore:
break;
- case Param:
default:
- PyErr_SetString(PyExc_SystemError,
- "param invalid for local variable");
+ PyErr_Format(PyExc_SystemError,
+ "expr_context kind %d should not be possible",
+ ctx);
return 0;
}
ADDOP_N(c, op, mangled, varnames);
@@ -3614,10 +3614,10 @@
case AugLoad:
case AugStore:
break;
- case Param:
default:
- PyErr_SetString(PyExc_SystemError,
- "param invalid for global variable");
+ PyErr_Format(PyExc_SystemError,
+ "expr_context kind %d should not be possible",
+ ctx);
return 0;
}
break;
@@ -3631,10 +3631,10 @@
case AugLoad:
case AugStore:
break;
- case Param:
default:
- PyErr_SetString(PyExc_SystemError,
- "param invalid for name variable");
+ PyErr_Format(PyExc_SystemError,
+ "expr_context kind %d should not be possible",
+ ctx);
return 0;
}
break;
@@ -5058,10 +5058,10 @@
case Del:
ADDOP_NAME(c, DELETE_ATTR, e->v.Attribute.attr, names);
break;
- case Param:
default:
- PyErr_SetString(PyExc_SystemError,
- "param invalid in attribute expression");
+ PyErr_Format(PyExc_SystemError,
+ "expr_context kind %d should not be possible",
+ e->v.Attribute.ctx);
return 0;
}
break;
@@ -5359,9 +5359,10 @@
case AugStore:/* fall through to Store */
case Store: op = STORE_SUBSCR; break;
case Del: op = DELETE_SUBSCR; break;
- case Param:
- PyErr_SetString(PyExc_SystemError,
- "param invalid in subscript expression");
+ default:
+ PyErr_Format(PyExc_SystemError,
+ "expr_context kind %d should not be possible",
+ ctx);
return 0;
}
if (ctx == AugStore) {