Kaydet (Commit) 2c4fb8d6 authored tarafından Georg Brandl's avatar Georg Brandl

Clean up a leftover from old listcomp generation code.

üst 8f99f81d
...@@ -2619,7 +2619,7 @@ compiler_listcomp_generator(struct compiler *c, PyObject *tmpname, ...@@ -2619,7 +2619,7 @@ compiler_listcomp_generator(struct compiler *c, PyObject *tmpname,
} }
ADDOP_JABS(c, JUMP_ABSOLUTE, start); ADDOP_JABS(c, JUMP_ABSOLUTE, start);
compiler_use_next_block(c, anchor); compiler_use_next_block(c, anchor);
/* delete the append method added to locals */ /* delete the temporary list name added to locals */
if (gen_index == 1) if (gen_index == 1)
if (!compiler_nameop(c, tmpname, Del)) if (!compiler_nameop(c, tmpname, Del))
return 0; return 0;
...@@ -2632,15 +2632,9 @@ compiler_listcomp(struct compiler *c, expr_ty e) ...@@ -2632,15 +2632,9 @@ compiler_listcomp(struct compiler *c, expr_ty e)
{ {
identifier tmp; identifier tmp;
int rc = 0; int rc = 0;
static identifier append;
asdl_seq *generators = e->v.ListComp.generators; asdl_seq *generators = e->v.ListComp.generators;
assert(e->kind == ListComp_kind); assert(e->kind == ListComp_kind);
if (!append) {
append = PyString_InternFromString("append");
if (!append)
return 0;
}
tmp = compiler_new_tmpname(c); tmp = compiler_new_tmpname(c);
if (!tmp) if (!tmp)
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment