diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-01-20 06:45:54 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-01-20 06:45:54 (GMT) |
commit | 5d69e6871a2a0b7e06ca9304eca47428b82e3d38 (patch) | |
tree | 088422c5a49cc6adbc3cff6ad9e8b4dba123dd6d /Doc | |
parent | 4f49c1c38add5420c6f1a7e031e51fcd5847d638 (diff) | |
parent | 744fdfbf9a749c3adfe01d927af15a5b54e75878 (diff) | |
download | cpython-5d69e6871a2a0b7e06ca9304eca47428b82e3d38.zip cpython-5d69e6871a2a0b7e06ca9304eca47428b82e3d38.tar.gz cpython-5d69e6871a2a0b7e06ca9304eca47428b82e3d38.tar.bz2 |
Issue #5626: Remove misleading comment from socket.gethostname() documentation
A machine can have more than one IP addresses so
socket.gethostbyname(socket.gethostname()) probably won't return the correct
one.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/socket.rst | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index a081756..8d90698 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -568,11 +568,6 @@ The :mod:`socket` module also offers various network-related services: Return a string containing the hostname of the machine where the Python interpreter is currently executing. - If you want to know the current machine's IP address, you may want to use - ``gethostbyname(gethostname())``. This operation assumes that there is a - valid address-to-host mapping for the host, and the assumption does not - always hold. - Note: :func:`gethostname` doesn't always return the fully qualified domain name; use :func:`getfqdn` for that. |