A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-July/036982.html below:

[Python-Dev] Recent experiences with socket.inet_aton, socket.inet_{ntop,pton}

[Python-Dev] Recent experiences with socket.inet_aton, socket.inet_{ntop,pton}Martin v. Löwis martin@v.loewis.de
20 Jul 2003 23:31:17 +0200
Bob Halley <halley@play-bow.org> writes:

> A good implementation must also detect and reject all of the invalid
> cases, such as improper use of the "::" zero compression syntax.

In that case, I think we should drop the inet_ntop wrapper from
socketmodule.c, and provide a pure-Python implementation in
socket.py. I know for fact that some platforms don't support AF_INET6
at all, but still provide inet_pton, hence all the #ifdef dances in
that function.

So if you need guarantees about its behaviour, you have to implement
it yourself.

Contributions in this direction are welcome; as Aahz points out, they
cannot have effect before 2.4. Make sure you provide plenty of test
cases, too.

Regards,
Martin



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4