[issue26448] dis.findlabels ignores EXTENDED_ARG

Eric Fahlgren report at bugs.python.org
Sat Feb 27 09:02:38 EST 2016


Eric Fahlgren added the comment:

Lookin' good so far.  How about we try it on all the opcodes that have arguments?

See attached example for which I can see two obvious improvements:
1) It could be improved by taking apart that "args" list and using it to synthesize "sample_code" rather than having to hand duplicate the values in two places, albeit with different byte order.
2) Likewise, my hard-coded "offsets" table is pretty awful. :)

Also, is there already a test for the dis module in which you could just add this as a case?

----------
Added file: http://bugs.python.org/file42039/testfindlabels.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26448>
_______________________________________


More information about the Python-bugs-list mailing list