On Sun, 21 Aug 2011 23:37:42 -0700, 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.
It doesn't. In fact, the order of the IP addresses may have been deliberately randomised (by the resolver and/or DNS server) in order to provide a simple form of load balancing. -- http://mail.python.org/mailman/listinfo/python-list