Message260918
Well, now that I'm thinking about it, you could synthesize a bytecode stream trivially and have a much better test. This is completely off the top of my head, so take it is guaranteed to (probably) not work as written, but it should get you started:
from opcodes import *
import dis
bytecode = (
chr(EXTENDED_ARG) + chr(1) + chr(0) +
chr(JUMP_IF_TRUE_OR_POP) + chr(0) + chr(0)
)
print(dis.findlabels(bytecode)) |
|
Date |
User |
Action |
Args |
2016-02-27 04:34:10 | eric.fahlgren | set | recipients:
+ eric.fahlgren, llllllllll, Barun Parruck |
2016-02-27 04:34:10 | eric.fahlgren | set | messageid: <1456547650.7.0.389919617824.issue26448@psf.upfronthosting.co.za> |
2016-02-27 04:34:10 | eric.fahlgren | link | issue26448 messages |
2016-02-27 04:34:10 | eric.fahlgren | create | |
|