And having explained all of that, it turns out that this book actually does need to introduce one additional address family, beyond the AF_INET we have used so far: the address family for IPv6, named AF_INET6, which is the way forward into a future where the world does not, in fact, run out of IP addresses.
In Python you can test directly for whether the underlying platform supports IPv6 by checking the
has_ipv6 Boolean attribute inside the socket module:
>>> import socket
But note that this does not tell you whether an actual IPv6 interface is up and configured and can currently be used to send packets anywhere; it is purely an assertion about whether IPv6 support has been compiled into the operating system, not about whether it is in use.
The differences that IPv6 will make for your Python code might sound quite daunting, if listed one right after the other: