Beispiel #1
0
 def COMPARE_OP(decompiler, op):
     oper2 = decompiler.stack.pop()
     oper1 = decompiler.stack.pop()
     return ast.Compare(oper1, [(op, oper2)])
Beispiel #2
0
 def CONTAINS_OP(decompiler, invert):
     oper2 = decompiler.stack.pop()
     oper1 = decompiler.stack.pop()
     # invert is set to 1 if operation performs "not in"
     # https://docs.python.org/3/library/dis.html#opcode-CONTAINS_OP
     return ast.Compare(oper1, [('not in' if invert else 'in', oper2)])