def v2_int_arg_check(self, arg=99): if not isinstance(arg, int): raise JSONRPCError(1, 'That is not an integer') else: return 'got an integer'
def v2_decrement(self, x, y=1): """Like subtract, but decrements by default.""" if not isinstance(x, int) and not isinstance(y, int): raise JSONRPCError(1, 'That is not an integer') else: return x - y
def subtract(self, x, y): if not isinstance(x, int) and not isinstance(y, int): raise JSONRPCError(1, 'That is not an integer') else: return x - y