9 Apr
2003
9 Apr
'03
7:41 a.m.
Ick ick. This is putting a bunch of code for a stub resolver into python. This stuff is hard to get right - I implemented this on top of pydns, and it was a lot of work to get (what I think is) correct, for not very much gain.
What I said.
The idea of either suppressing DNS lookups for all-numeric addresses, or some sort of extended API for suppressing DNS lookups might be better, but really, isn't this the job of the stub resolver?
Hey, I just figured it out. The old socket module (Python 2.1 and before) *did* special-case \d+\.\d+\.\d+\.\d+! This code was somehow lost when the IPv6 support was added. I propose to put it back in, at least for IPv4 (AF_INET). Patch anyone? --Guido van Rossum (home page: http://www.python.org/~guido/)