3 ms·
You can destructure the address tuple in the arguments: def handle_socket((sock, ip)): while True: sock.send(sock.recv(1))
by blasdel 17y ago
You can destructure the address tuple in the arguments:
def handle_socket((sock, ip)):
while True:
sock.send(sock.recv(1))
- mcav 17y agoYeah; I didn't want to confuse people who don't know that Eventlet's API passes a tuple (they might think it sends handle_socket 2 arguments)