[Python-Dev] [patch #100927] Fix for broken gethostbyname("0")

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Fri, 21 Jul 2000 07:21:02 +0300 (IDT)


On Fri, 21 Jul 2000, Fredrik Lundh wrote:

> this patch by Pekka Pessi adds support for "0" and "-1"
> to gethostbyname:
> 
>     "0" (a string, not an integer) is the same thing as ""
>     (INADDR_ANY)
> 
>     "-1" is the same thing as "<broadcast>".
>     (INADDR_BROADCAST)
> 
> Pekka hasn't followed up on my comments on the patch
> page, so I thought I'd take the question to this forum in-
> stead:
> 
>     -- why is gethostbyname "broken" if it doesn't
>        support the magic strings "0" and "-1"?
> 
> I'm tempted to reject the patch, but I'm probably missing
> something here...

I'm -1 on the patch too.
--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez