Paul Marks added the comment:

> if the user specifically wants to bind to a numeric IPv4 address, is there 
> any advantage of choosing the dual-stack [...]?

If you're in a position to write AF_INET6-only code, then dualstack sockets can 
make things a bit cleaner (one family for all IP communication).  But given 
that Python couldn't reasonably drop support for AF_INET-only systems, there's 
not a compelling reason to prefer dualstack sockets for IPv4 stuff.

They're just two windows into the same kernel code, so the decision is mostly 
arbitrary.

However, Python likes to expose IP addresses as plain strings without 
transparent ::ffff:0.0.0.0/96 handling, which tends to make dualstack sockets a 
leaky abstraction.  Ideally, you'd be able to talk to the kernel using AF_INET 
or AF_INET6 without normal users knowing the difference.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20215>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to