Skip to content

Commit 1c44402

Browse files
authored
gh-150952: Fix incorrect sock_sendto docstring (#150953)
1 parent 87411d0 commit 1c44402

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

Lib/asyncio/selector_events.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -586,14 +586,10 @@ def _sock_sendall(self, fut, sock, view, pos):
586586
pos[0] = start
587587

588588
async def sock_sendto(self, sock, data, address):
589-
"""Send data to the socket.
589+
"""Send a datagram from sock to address.
590590
591-
The socket must be connected to a remote socket. This method
592-
continues to send data from data until either all data has been
593-
sent or an error occurs. None is returned on success. On error,
594-
an exception is raised, and there is no way to determine how much
595-
data, if any, was successfully processed by the receiving end of
596-
the connection.
591+
The socket does not have to be connected. This method sends the
592+
whole datagram in a single call. Return the number of bytes sent.
597593
"""
598594
base_events._check_ssl_socket(sock)
599595
if self._debug and sock.gettimeout() != 0:

0 commit comments

Comments
 (0)