def handle_add_two_ints(req): print "Returning [%s + %s = %s]" % (req.a, req.b, (req.a + req.b)) res = AddTwoIntsResponse() res.a = 9 res.b = 90 res.sum = res.a + res.b return res
def handler(req): print "Adding a (%d) and b (%d)" % (req.a, req.b) response = AddTwoIntsResponse(req.a + req.b) d = defer.Deferred() # Simulate a long-running computation reactor.callLater(0.1, d.callback, response) return d
def handle_add_two_ints(req): print "Returning [%s + %s = %s]" % (req.a, req.b, (req.a + req.b)) return AddTwoIntsResponse(req.a + req.b)
def handle_add_two_ints(req): print("Returning the matrix transformation") return AddTwoIntsResponse( matrix_transform(req.x, req.y, req.z, req.a, req.b, req.c, req.d))
def handle_add_two_ints(req): # Recieves an instance of AddTwoIntsRequest print("Returning [%s + %s = %s]" % (req.a, req.b, (req.a + req.b))) # Returns an instance of AddTwoIntsResponse return AddTwoIntsResponse(req.a + req.b)
def onAdd(request): print("Returning [{} + {} = {}]".format(request.a, request.b, (request.a + request.b))) return (AddTwoIntsResponse(request.a + request.b))
def Respuesta(req): print "Retorna %s + %s = %s"%(req.a, req.b, (req.a + req.b)) return AddTwoIntsResponse(req.a + req.b)