A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-June/015536.html below:

[Python-Dev] gethostbyname2

[Python-Dev] gethostbyname2Guido van Rossum guido@digicool.com
Sun, 24 Jun 2001 09:23:52 -0400
> The IPv6 patch proposes to introduce a new socket function,
> socket.gethostbyname2(name, af). This becomes necessary as a name
> might have both an IPv4 and an IPv6 address.
> 
> One alternative for providing such API is to get socket.gethostbyname
> an optional second argument (the address family). itojun's rationale
> for calling it gethostbyname2 is that the C API, as defined in RFC
> 2133.
> 
> Which of these alternatives would you prefer?

Definitely an optional 2nd arg to gethostbyname() -- in C, you can't
do tht, so they *had* to create a new function, but Python is more
flexible.

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



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