Message84816
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. |
|
Date |
User |
Action |
Args |
2009-03-31 16:03:02 | ned.deily | set | recipients:
+ ned.deily, georg.brandl |
2009-03-31 16:03:02 | ned.deily | set | messageid: <1238515382.33.0.784525971679.issue5626@psf.upfronthosting.co.za> |
2009-03-31 16:02:52 | ned.deily | link | issue5626 messages |
2009-03-31 16:02:51 | ned.deily | create | |
|