diff options
author | Georg Brandl <georg@python.org> | 2008-05-11 07:06:05 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-11 07:06:05 (GMT) |
commit | d809603623b7817353eaf4f4647cb92e635d1206 (patch) | |
tree | 675e3a2f5783fdd375e8122b8f5404c2596f1e4f | |
parent | eb83f70586d6fc7ac1526c823a0567a22477ebdd (diff) | |
download | cpython-d809603623b7817353eaf4f4647cb92e635d1206.zip cpython-d809603623b7817353eaf4f4647cb92e635d1206.tar.gz cpython-d809603623b7817353eaf4f4647cb92e635d1206.tar.bz2 |
#2742: ``''`` is not converted to NULL in getaddrinfo.
-rw-r--r-- | Doc/library/socket.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index e3591f6..b6640ae 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -225,9 +225,9 @@ The module :mod:`socket` exports the following constants and functions: service name (like ``'http'``), a numeric port number or ``None``. The rest of the arguments are optional and must be numeric if specified. For - *host* and *port*, by passing either an empty string or ``None``, you can pass - ``NULL`` to the C API. The :func:`getaddrinfo` function returns a list of - 5-tuples with the following structure: + *host* and *port*, by passing ``None``, you can pass ``NULL`` to the C API. + The :func:`getaddrinfo` function returns a list of 5-tuples with the following + structure: ``(family, socktype, proto, canonname, sockaddr)`` @@ -846,7 +846,7 @@ sends traffic to the first one connected successfully. :: import socket import sys - HOST = '' # Symbolic name meaning all available interfaces + HOST = None # Symbolic name meaning all available interfaces PORT = 50007 # Arbitrary non-privileged port s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE): |