Message267583
Attached is a patch which fixes test_sys_settrace & test_pdb & test_trace. Still failing is test_genexps. I'm unsure the best way to fix this one:
1. Allow generator expressions to defer type errors about non iterables until the initial call to next
2. Create a TEST_ITER opcode entirely for generator expressions to eagerly throw
3. Generate instructions like
FOR_BEGIN, if empty, jump over generator & put an empty generator on the stack
-> CALL_FUNCTION 2, have generator produce code as LOAD_FAST 0, LOAD_FAST 1, <code>, FOR_ITER repeat <code> (ie translate stack of FOR_BEGIN from before call as header of generator)
Empty generator can be created with 'LOAD_CONST (None,), FOR_BEGIN, POP' but it seems rather bad to have generators require 3 more opcodes around their creation than currently |
|
Date |
User |
Action |
Args |
2016-06-07 03:55:39 | Demur Rumed | set | recipients:
+ Demur Rumed, dino.viehland, serhiy.storchaka |
2016-06-07 03:55:39 | Demur Rumed | set | messageid: <1465271739.5.0.938317507323.issue27127@psf.upfronthosting.co.za> |
2016-06-07 03:55:39 | Demur Rumed | link | issue27127 messages |
2016-06-07 03:55:39 | Demur Rumed | create | |
|