Kaydet (Commit) accb38c7 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

clarify by splitting into multiple paragraphs

üst b9828f67
...@@ -276,11 +276,15 @@ The module :mod:`socket` exports the following constants and functions: ...@@ -276,11 +276,15 @@ The module :mod:`socket` exports the following constants and functions:
.. function:: gethostname() .. function:: gethostname()
Return a string containing the hostname of the machine where the Python 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 interpreter is currently executing.
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 If you want to know the current machine's IP address, you may want to use
assumption does not always hold. Note: :func:`gethostname` doesn't always return ``gethostbyname(gethostname())``. This operation assumes that there is a
the fully qualified domain name; use ``getfqdn()`` (see above). 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 ``getfqdn()`` (see above).
.. function:: gethostbyaddr(ip_address) .. function:: gethostbyaddr(ip_address)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment