Skip to content

Commit

Permalink
fix removal of __class__
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Feb 7, 2024
1 parent d1217f2 commit 1e3d81b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/symtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ inline_comprehension(PySTEntryObject *ste, PySTEntryObject *comp,
}
}
comp->ste_free = PySet_Size(comp_free) > 0;
if (remove_dunder_class && PyDict_DelItem(comp->ste_symbols, k) < 0) {
if (remove_dunder_class && PyDict_DelItemString(comp->ste_symbols, "__class__") < 0) {
return 0;
}
return 1;
Expand Down

0 comments on commit 1e3d81b

Please sign in to comment.