Guido van Rossum added the comment: I don't know why it used to accept a string port, but I can't find anything in the docs indicating that is acceptable. I am guessing the doc authors assumed it was so obvious that a port is an integer they forgot to mention it.
I can guess that in the past some system API was used that considered the port a "servname" to be looked up in /etc/services (likely the getaddrinfo() call). But if you were passing '12345' instead of 12345, well, you always had a latent bug in your program. I don't think the code ought to be adjusted to explicitly reject string ports; but I do think the docs should be clarified on the issue. ---------- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26437> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com