[Python-checkins] cpython (2.7): #26209: Clarify type of *localaddr*/*remoteadr* in smtpd docs.
r.david.murray
python-checkins at python.org
Wed Sep 7 14:10:12 EDT 2016
https://hg.python.org/cpython/rev/7aaf8cff23e5
changeset: 103236:7aaf8cff23e5
branch: 2.7
parent: 103207:923a27028cec
user: R David Murray <rdmurray at bitdance.com>
date: Wed Sep 07 14:09:51 2016 -0400
summary:
#26209: Clarify type of *localaddr*/*remoteadr* in smtpd docs.
files:
Doc/library/smtpd.rst | 7 ++++---
Doc/library/socket.rst | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst
--- a/Doc/library/smtpd.rst
+++ b/Doc/library/smtpd.rst
@@ -23,9 +23,10 @@
.. 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)
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -34,6 +34,8 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list