Skip to content

Commit 0efb5b1

Browse files
deadlovelllmiss-islington
authored andcommitted
gh-150952: Fix incorrect sock_sendto docstring (GH-150953)
(cherry picked from commit 1c44402) Co-authored-by: Timofei <128279579+deadlovelll@users.noreply.github.com>
1 parent b6f24be commit 0efb5b1

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
@@ -585,14 +585,10 @@ def _sock_sendall(self, fut, sock, view, pos):
585585
pos[0] = start
586586

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

0 commit comments

Comments
 (0)