def _do_IndexExpression(self, node, context): expr = self.transform(node.Target) index = node.Index if isinstance(index, SliceExpression) and index.SliceStep is None: lower = self.transform(index.SliceStart) upper = self.transform(index.SliceStop) return ast.Slice(expr, context, lower, upper) sub = self.transform(index) return ast.Subscript(expr, context, [sub])
def SLICE_2(decompiler): tos = decompiler.stack.pop() tos1 = decompiler.stack.pop() return ast.Slice(tos1, 'OP_APPLY', None, tos)
def SLICE_3(decompiler): tos = decompiler.stack.pop() tos1 = decompiler.stack.pop() tos2 = decompiler.stack.pop() return ast.Slice(tos2, 'OP_APPLY', tos1, tos)
def SLICE_0(decompiler): return ast.Slice(decompiler.stack.pop(), 'OP_APPLY', None, None)