@@ -4919,7 +4919,6 @@ codegen_push_inlined_comprehension_locals(compiler *c, location loc,
49194919{
49204920 int in_class_block = (SYMTABLE_ENTRY (c )-> ste_type == ClassBlock ) &&
49214921 !_PyCompile_IsInInlinedComp (c );
4922- PySTEntryObject * outer = SYMTABLE_ENTRY (c );
49234922 // iterate over names bound in the comprehension and ensure we isolate
49244923 // them from the outer scope as needed
49254924 PyObject * k , * v ;
@@ -4930,10 +4929,6 @@ codegen_push_inlined_comprehension_locals(compiler *c, location loc,
49304929 RETURN_IF_ERROR (symbol );
49314930 long scope = SYMBOL_TO_SCOPE (symbol );
49324931
4933- long outsymbol = _PyST_GetSymbol (outer , k );
4934- RETURN_IF_ERROR (outsymbol );
4935- long outsc = SYMBOL_TO_SCOPE (outsymbol );
4936-
49374932 if ((symbol & DEF_LOCAL && !(symbol & DEF_NONLOCAL )) || in_class_block ) {
49384933 // local names bound in comprehension must be isolated from
49394934 // outer scope; push existing value (which may be NULL if
@@ -4949,11 +4944,7 @@ codegen_push_inlined_comprehension_locals(compiler *c, location loc,
49494944 // comprehension and restore the original one after
49504945 ADDOP_NAME (c , loc , LOAD_FAST_AND_CLEAR , k , varnames );
49514946 if (scope == CELL ) {
4952- if (outsc == FREE ) {
4953- ADDOP_NAME (c , loc , MAKE_CELL , k , freevars );
4954- } else {
4955- ADDOP_NAME (c , loc , MAKE_CELL , k , cellvars );
4956- }
4947+ ADDOP_NAME (c , loc , MAKE_CELL , k , cellvars );
49574948 }
49584949 if (PyList_Append (state -> pushed_locals , k ) < 0 ) {
49594950 return ERROR ;
0 commit comments