[issue26209] TypeError in smtpd module with string arguments

Lorenzo Ancora report at bugs.python.org
Sat Feb 6 19:03:44 EST 2016


Lorenzo Ancora added the comment:

(msg259748) ok, then I propose to correct https://docs.python.org/dev/library/smtpd.html?highlight=q#smtpd.SMTPServer from:

.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432,\
                      map=None, enable_SMTPUTF8=False, decode_data=True)

   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.


To:


.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432,\
                      map=None, enable_SMTPUTF8=False, decode_data=True)

   Creates a new :class:`SMTPServer` object, which binds to local address
   *localaddr* and uses *remoteaddr* as an upstream SMTP relayer.
   Both parameters should be a tuple in the form ``("host", portnumber)``, where *host* is a valid IP/FQDN.
   The object will insert itself into :mod:`asyncore`'s event loop on instantiation (inherits from :class:`asyncore.dispatcher`) and can be started with a call to :class:`asyncore.loop`.

---

These clarifications should be also inserted in the source code as heredocs (without the Sphynx syntax).
I really think that those changes will make the use of smtpd easier.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26209>
_______________________________________


More information about the Python-bugs-list mailing list