def pythagoras(zcontext, url):
 zsock = zcontext.socket(zmq.REP)
 zsock.bind(url)
 while True:
  numbers = zsock.recv_json()
  zsock.send_json(sum(((n * n) for n in numbers)))

def pythagoras ( zcontext , url ) : zsock = zcontext . socket ( zmq . REP ) zsock . bind ( url ) while True : numbers = zsock . recv_json ( ) zsock . send_json ( sum ( ( ( n * n ) for n in numbers ) ) )
return the sum-of-squares of number sequences .