This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Documentation for socket.gethostname() needs tweaking
Type: Stage:
Components: Documentation Versions: Python 2.5.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, georg.brandl, roysmith
Priority: normal Keywords:

Created on 2008-11-03 19:46 by roysmith, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg75476 - (view) Author: Roy Smith (roysmith) Date: 2008-11-03 19:46
The docs say:

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...

It is not clear what the referent of "This" is.  Are you saying that 
gethostname() itself makes that assumption, or the use of gethostbyname() 
to turn what gethostname() returns into an address makes that assumption?  
I think it's the latter, but the sentence should be reworded to make it 
clear.
msg75477 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-03 20:44
Thanks for the suggestion fixed in r67089.
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48507
2008-11-03 20:44:10benjamin.petersonsetstatus: open -> closed
nosy: + benjamin.peterson
resolution: fixed
messages: + msg75477
2008-11-03 19:46:40roysmithcreate