[issue4257] Documentation for socket.gethostname() needs tweaking

Roy Smith report at bugs.python.org
Mon Nov 3 20:46:40 CET 2008


New submission from Roy Smith <roy at panix.com>:

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.

----------
assignee: georg.brandl
components: Documentation
messages: 75476
nosy: georg.brandl, roysmith
severity: normal
status: open
title: Documentation for socket.gethostname() needs tweaking
versions: Python 2.5.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4257>
_______________________________________


More information about the Python-bugs-list mailing list