Order of addresses returned by socket.gethostbyname_ex()

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Aug 22 10:15:52 CEST 2011


On Mon, 22 Aug 2011 04:37 pm Tomas Lidén wrote:

> In what order are the addresses returned by socket.gethostbyname_ex()?
> 
> We know that gethostbyname() is indeterministic but hope that
> gethostbyname_ex() has a specified order.

Did you want a particular order, or just any deterministic order?

Have you considered sorting the addresses yourself?



-- 
Steven




More information about the Python-list mailing list