The behaviour is inconsistent with CPython as shown here:
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_04
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo(None,8888)
[(2, None, 0, 'oscar-linux.local', ('127.0.0.1', 8888))]
Python 2.5.3 (r253:67855, May 24 2012, 13:39:10)
[GCC 4.5.1 20100924 (Red Hat 4.5.1-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo(None,8888)
[(10, 1, 6, '', ('::1', 8888, 0, 0)), (10, 2, 17, '', ('::1', 8888, 0, 0)), (10, 3, 0, '', ('::1', 8888, 0, 0)), (
2, 1, 6, '', ('127.0.0.1', 8888)), (2, 2, 17, '', ('127.0.0.1', 8888)), (2, 3, 0, '', ('127.0.0.1', 8888))]
Jython 2.7a1 behaviour is identical to 2.5.3b1. |