def _iter_code(code):
from array import array<EOL>from dis import HAVE_ARGUMENT, EXTENDED_ARG<EOL>bytes = array('<STR_LIT:b>',code.co_code)<EOL>eof = len(code.co_code)<EOL>ptr = <NUM_LIT:0><EOL>extended_arg = <NUM_LIT:0><EOL>while ptr<eof:<EOL><INDENT>op = bytes[ptr]<EOL>if op>=HAVE_ARGUMENT:<EOL><INDENT>arg = bytes[ptr+<NUM_LIT:1>] + bytes[ptr+<NUM_LIT:2>]*<NUM_LIT> + extended_arg<EOL>ptr += <NUM_LIT:3><EOL>if op==EXTENDED_ARG:<EOL><INDENT>extended_arg = arg * <NUM_LIT><EOL>continue<EOL><DEDENT><DEDENT>else:<EOL><INDENT>arg = None<EOL>ptr += <NUM_LIT:1><EOL><DEDENT>yield op,arg<EOL><DEDENT>
Yield '(op,arg)' pair for each operation in code object 'code