]> granicus.if.org Git - python/commitdiff
#26209: Clarify type of *localaddr*/*remoteadr* in smtpd docs.
authorR David Murray <rdmurray@bitdance.com>
Wed, 7 Sep 2016 18:09:51 +0000 (14:09 -0400)
committerR David Murray <rdmurray@bitdance.com>
Wed, 7 Sep 2016 18:09:51 +0000 (14:09 -0400)
Doc/library/smtpd.rst
Doc/library/socket.rst

index ebb0b302d226a303a89a994de7dc460f5ca918a2..7d6534b388c70c343a872a0ccb0725e259f89e15 100644 (file)
@@ -23,9 +23,10 @@ SMTPServer Objects
 .. class:: SMTPServer(localaddr, remoteaddr)
 
    Create a new :class:`SMTPServer` object, which binds to local address
-   *localaddr*.  It will treat *remoteaddr* as an upstream SMTP relayer.  It
-   inherits from :class:`asyncore.dispatcher`, and so will insert itself into
-   :mod:`asyncore`'s event loop on instantiation.
+   *localaddr*.  It will treat *remoteaddr* as an upstream SMTP relayer.  Both
+   *localaddr* and *remoteaddr* should be a :ref:`(host, port) <host_port>`
+   tuple.  The object inherits from :class:`asyncore.dispatcher`, and so will
+   insert itself into :mod:`asyncore`'s event loop on instantiation.
 
 
    .. method:: process_message(peer, mailfrom, rcpttos, data)
index 73b5d5c9d87a8ced0581c4f644eb3f5fe729d403..aff6a2e06eda94f98951324029575a339bbb7513 100644 (file)
@@ -34,6 +34,8 @@ in the C interface: as with :meth:`read` and :meth:`write` operations on Python
 files, buffer allocation on receive operations is automatic, and buffer length
 is implicit on send operations.
 
+.. _host_port:
+
 Socket addresses are represented as follows: A single string is used for the
 :const:`AF_UNIX` address family. A pair ``(host, port)`` is used for the
 :const:`AF_INET` address family, where *host* is a string representing either a