[Python-3000] IPv6 address tuple

Erno Kuusela erno at iki.fi
Sat Mar 24 08:19:25 CET 2007


hello,

On Sat, 24 Mar 2007, Jun-ichiro itojun Hagino wrote:

| > 	i understand your concern.  current 4-tuple is direct mapping from
| > 	struct sockaddr_in6 (which has those two additional members).
| 
| 	note however, you must rewrite DNS resolving from gethostby* to
| 	get*info anyways, so i'm not too sure if the number of tuple members in
| 	sockaddr matters that much.

I agree that when using those functions and treating the address
tuple as opaque, things work out OK.

The problem is that people do unpack the tuple a lot of the time as the
first thing when they get the address. I suppose the elements are
sometimes later used for things like logging and debug output. Also
people are used to conceptually destructuring the address as "host,
port" in their heads so it's logical to unpack it.

  -- erno


More information about the Python-3000 mailing list