Eric Fahlgren added the comment:

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))

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26448>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to