]> granicus.if.org Git - python/commitdiff
#2742: ``''`` is not converted to NULL in getaddrinfo.
authorGeorg Brandl <georg@python.org>
Sun, 11 May 2008 07:06:05 +0000 (07:06 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 11 May 2008 07:06:05 +0000 (07:06 +0000)
Doc/library/socket.rst

index e3591f6b5bec829215dec6d400fc808fc054a2ca..b6640aee23dbcc42fca3d2c1e4fe5e02193a262d 100644 (file)
@@ -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):