for example to get IP address of all interfaces we have to use the third (indexed as 2) member of "something" it is much more beatiful to get ip_address:
import socket for ip in socket.gethostbyname_ex(socket.gethostname()): print(ip)
2017-06-13 22:13 GMT+02:00 Thomas Güttler firstname.lastname@example.org:
AFAIK the socket module returns plain tuples in Python3:
Why not use named tuples?
Regards, Thomas Güttler
-- I am looking for feedback for my personal programming guidelines: https://github.com/guettli/programming-guidelines
Python-ideas mailing list Pythonemail@example.com https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/