mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Clean up a leftover from old listcomp generation code.
This commit is contained in:
parent
8f99f81dfc
commit
2c4fb8d601
1 changed files with 1 additions and 7 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue