def opcodize(s):
length = len(s)<EOL>i = <NUM_LIT:0><EOL>answer = []<EOL>while i < length:<EOL><INDENT>bytecode = ord(s[i])<EOL>name = byOpcode[bytecode]<EOL>if bytecode >= haveArgument:<EOL><INDENT>argument = <NUM_LIT>*ord(s[i+<NUM_LIT:2>])+ord(s[i+<NUM_LIT:1>])<EOL>i += <NUM_LIT:3><EOL><DEDENT>else:<EOL><INDENT>argument = None<EOL>i += <NUM_LIT:1><EOL><DEDENT>answer.append((bytecode,argument,name))<EOL><DEDENT>return answer<EOL>
Slightly more readable form