def get_opcode(self):
# Based on the settings decide to show the line-by-line trace
# Get the current line being executed
ip = self.__ip
op = self.__code[self.__ip]
ip += 1
opmethod = "execute_%s" % dis.opname[op]
oparg = None
if op >= dis.HAVE_ARGUMENT:
low = self.__code[ip]
high = self.__code[ip + 1]
oparg = (high << 8) | low
return opmethod, oparg
评论列表
文章目录