aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r--Doc/library/socket.rst11
1 files changed, 5 insertions, 6 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 8fefce69424..15e66c70a4b 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -197,12 +197,11 @@ The module :mod:`socket` exports the following constants and functions:
.. function:: create_connection(address[, timeout])
- Connects to the *address* received (as usual, a ``(host, port)`` pair), with an
- optional timeout for the connection. Especially useful for higher-level
- protocols, it is not normally used directly from application-level code.
- Passing the optional *timeout* parameter will set the timeout on the socket
- instance (if it is not given or ``None``, the global default timeout setting is
- used).
+ Convenience function. Connect to *address* (a 2-tuple ``(host, port)``),
+ and return the socket object. Passing the optional *timeout* parameter will
+ set the timeout on the socket instance before attempting to connect. If no
+ *timeout* is supplied, the global default timeout setting returned by
+ :func:`getdefaulttimeout` is used.
.. function:: getaddrinfo(host, port[, family[, socktype[, proto[, flags]]]])