[docs] [issue26209] TypeError in smtpd module with string arguments

Lorenzo Ancora report at bugs.python.org
Tue Feb 2 22:52:29 EST 2016


Lorenzo Ancora added the comment:

(msg259229) Terry J. Reedy i Suggest that a standard and globally accepted scheme to manage IPv4 addresses is:

  "Host:PortNumber" --> (host, PortNumber)
  "Host"            --> (host, DefaultPortNumber)
  "IP:PortNumber" --> (host, PortNumber)
  "IP"            --> (host, DefaultPortNumber)

...where DefaultPortNumber is protocol and system dependent (IANA standard, see the SMTP line in: http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml).

A simple research reveals that all versions of the module are (sadly) poorly documented, but the module is an interface to a very important protocol that indeed must be offered by the standard library.
The only little suggestion in the documentation of the module is: https://docs.python.org/3.6/library/socket.html#socket.socket.accept
...from a one-word link in: https://docs.python.org/3.6/library/smtpd.html#smtpd.SMTPChannel.addr
Which has only an indirect relation with the object itself.

Many users may not recognize the cause of the error if the documentation doesn't explicitate the information to correctly initialize the core objects of the module.
I also Suggest that at least the object should return an helpful error in newer versions of Python.

Thank you for your efforts guys. :-)

----------
components: +Library (Lib)
versions: +Python 3.2, Python 3.3, Python 3.4

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


More information about the docs mailing list