]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-150952: Fix incorrect sock_sendto docstring (#150953)
authorTimofei <128279579+deadlovelll@users.noreply.github.com>
Wed, 15 Jul 2026 08:44:30 +0000 (11:44 +0300)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2026 08:44:30 +0000 (08:44 +0000)
Lib/asyncio/selector_events.py

index 492dfcb19dafe2274072860398533a14ec8bfdf0..97cb6b76ac2e89a1129ab41f7b7dfcc20ee553e0 100644 (file)
@@ -586,14 +586,10 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
             pos[0] = start
 
     async def sock_sendto(self, sock, data, address):
-        """Send data to the socket.
+        """Send a datagram from sock to address.
 
-        The socket must be connected to a remote socket.  This method
-        continues to send data from data until either all data has been
-        sent or an error occurs.  None is returned on success.  On error,
-        an exception is raised, and there is no way to determine how much
-        data, if any, was successfully processed by the receiving end of
-        the connection.
+        The socket does not have to be connected. This method sends the
+        whole datagram in a single call. Return the number of bytes sent.
         """
         base_events._check_ssl_socket(sock)
         if self._debug and sock.gettimeout() != 0: