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.

Author ned.deily
Recipients georg.brandl, ned.deily
Date 2009-03-31.16:02:51
SpamBayes Score 7.857924e-07
Marked as misclassified No
Message-id <1238515382.33.0.784525971679.issue5626@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation for socket.gethostname() contains the following 
comment:

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

This comment leads to the mistaken assumption that a machine has only 
one IP address, an assumption which results in bugs such as in 
Issue5625.  The comment also does not deal with other address families, 
i.e. IPv6 addresses.  Either the paragraph should be expanded to cover 
multiple addresses and families, requiring the use of other socket 
functions, or the paragraph should simply be removed.
History
Date User Action Args
2009-03-31 16:03:02ned.deilysetrecipients: + ned.deily, georg.brandl
2009-03-31 16:03:02ned.deilysetmessageid: <1238515382.33.0.784525971679.issue5626@psf.upfronthosting.co.za>
2009-03-31 16:02:52ned.deilylinkissue5626 messages
2009-03-31 16:02:51ned.deilycreate