mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-39969: Remove ast.Param node class as is no longer used (GH-19020)
This commit is contained in:
parent
61ac612e78
commit
8689209e03
7 changed files with 27 additions and 51 deletions
|
@ -3579,10 +3579,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
|||
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 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
|||
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 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
|||
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 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
|||
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 @@ compiler_visit_expr1(struct compiler *c, expr_ty e)
|
|||
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 @@ compiler_subscript(struct compiler *c, expr_ty e)
|
|||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue