[Python-Dev] _socket efficiencies ideas (original) (raw)

Guido van Rossum guido@python.org
Wed, 09 Apr 2003 10:37:35 -0400


OK, I'll chime back in on the thread I started... I mostly have a question for Sean, since he seems to know the networking stuff well.

I'll chime in nevertheless.

Do you know of any reason why my original proposal (which is to allows IP addresses prefixed with e.g. 127.0.0.1 to cause both the AIPASSIVE and AINUMERIC flags to get set when resolution is attempted, which basically causes parsing with not real resolution at all) would break any known or plausible networking standards?

What are those flags? Which API uses them?

I still don't understand why intercepting the all-numeric syntax isn't good enough, and why you want a prefix.

The current Python socket module basically hides this part of the BSD socket API, and I find it quite useful to be able to suppress DNS activity absolutely for some addresses. And for Guido: since this type of tag has already been used in Python (as ), is there any reason why this solution is inelegant?

The reason I'm reluctant to add a new notation is that AFAIK it would be unique to Python. It's better to stick to standard notations IMO. was probably a mistake, since it seems to mean the same as 0.0.0.0 (for IPv4).

--Guido van Rossum (home page: http://www.python.org/~guido/)