@@ -3579,10 +3579,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
35793579 case AugStore :
35803580 break ;
35813581 case Del : op = DELETE_DEREF ; break ;
3582- case Param :
35833582 default :
3584- PyErr_SetString (PyExc_SystemError ,
3585- "param invalid for deref variable" );
3583+ PyErr_Format (PyExc_SystemError ,
3584+ "expr_context kind %d should not be possible" ,
3585+ ctx );
35863586 return 0 ;
35873587 }
35883588 break ;
@@ -3596,10 +3596,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
35963596 case AugLoad :
35973597 case AugStore :
35983598 break ;
3599- case Param :
36003599 default :
3601- PyErr_SetString (PyExc_SystemError ,
3602- "param invalid for local variable" );
3600+ PyErr_Format (PyExc_SystemError ,
3601+ "expr_context kind %d should not be possible" ,
3602+ ctx );
36033603 return 0 ;
36043604 }
36053605 ADDOP_N (c , op , mangled , varnames );
@@ -3614,10 +3614,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
36143614 case AugLoad :
36153615 case AugStore :
36163616 break ;
3617- case Param :
36183617 default :
3619- PyErr_SetString (PyExc_SystemError ,
3620- "param invalid for global variable" );
3618+ PyErr_Format (PyExc_SystemError ,
3619+ "expr_context kind %d should not be possible" ,
3620+ ctx );
36213621 return 0 ;
36223622 }
36233623 break ;
@@ -3631,10 +3631,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
36313631 case AugLoad :
36323632 case AugStore :
36333633 break ;
3634- case Param :
36353634 default :
3636- PyErr_SetString (PyExc_SystemError ,
3637- "param invalid for name variable" );
3635+ PyErr_Format (PyExc_SystemError ,
3636+ "expr_context kind %d should not be possible" ,
3637+ ctx );
36383638 return 0 ;
36393639 }
36403640 break ;
@@ -5058,10 +5058,10 @@ compiler_visit_expr1(struct compiler *c, expr_ty e)
50585058 case Del :
50595059 ADDOP_NAME (c , DELETE_ATTR , e -> v .Attribute .attr , names );
50605060 break ;
5061- case Param :
50625061 default :
5063- PyErr_SetString (PyExc_SystemError ,
5064- "param invalid in attribute expression" );
5062+ PyErr_Format (PyExc_SystemError ,
5063+ "expr_context kind %d should not be possible" ,
5064+ e -> v .Attribute .ctx );
50655065 return 0 ;
50665066 }
50675067 break ;
@@ -5359,9 +5359,10 @@ compiler_subscript(struct compiler *c, expr_ty e)
53595359 case AugStore :/* fall through to Store */
53605360 case Store : op = STORE_SUBSCR ; break ;
53615361 case Del : op = DELETE_SUBSCR ; break ;
5362- case Param :
5363- PyErr_SetString (PyExc_SystemError ,
5364- "param invalid in subscript expression" );
5362+ default :
5363+ PyErr_Format (PyExc_SystemError ,
5364+ "expr_context kind %d should not be possible" ,
5365+ ctx );
53655366 return 0 ;
53665367 }
53675368 if (ctx == AugStore ) {
0 commit comments