Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
accb38c7
Commit
accb38c7
authored
Nov 03, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify by splitting into multiple paragraphs
parent
b9828f67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Doc/library/socket.rst
Doc/library/socket.rst
+9
-5
No files found.
Doc/library/socket.rst
View file @
accb38c7
...
...
@@ -276,11 +276,15 @@ The module :mod:`socket` exports the following constants and functions:
.. function:: gethostname()
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 ``getfqdn()`` (see above).
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 ``getfqdn()`` (see above).
.. function:: gethostbyaddr(ip_address)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment