Skip to content

Commit ab11d74

Browse files
[3.14] gh-150952: Fix incorrect sock_sendto docstring (GH-150953) (#154625)
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 a73668a commit ab11d74

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

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

0 commit comments

Comments
 (0)