Message45205
Logged In: YES
user_id=80475
FWIW, here is a patch that moves the GET_ITER back inside
the generator so that the implementation will more closely
match the spec and match the operation of regular generators.
*** compile.c 19 May 2004 08:20:15 -0000 2.302
--- compile.c 20 May 2004 17:29:35 -0000
***************
*** 1628,1633 ****
--- 1628,1634 ----
if (is_outmost) {
com_addop_varname(c, VAR_LOAD,
"[outmost-iterable]");
+ com_addbyte(c, GET_ITER);
com_push(c, 1);
}
else {
***************
*** 1819,1825 ****
com_addoparg(c, MAKE_FUNCTION, 0);
com_test(c, CHILD(CHILD(n, 1), 3));
- com_addbyte(c, GET_ITER);
com_addoparg(c, CALL_FUNCTION, 1);
com_pop(c, 1);
--- 1820,1825 ----
|
|
Date |
User |
Action |
Args |
2007-08-23 15:31:41 | admin | link | issue872326 messages |
2007-08-23 15:31:41 | admin | create | |
|