[Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

Peter Moody peter at hda3.com
Tue Aug 18 22:53:36 CEST 2009


On Tue, Aug 18, 2009 at 1:34 PM, Oleg Broytmann<phd at phd.pp.ru> wrote:
>> http://ipaddr-py.googlecode.com/svn/branches/2.0.x/ipaddr.py :
>
>> def IP(address, host=False, version=None):
>>     """Take an IP string/int and return an object of the correct type.
>>
>>     Args:
>>         ip_str: ...
>
>   The arg is 'address', not 'ip_str'.

d'oh, fixed.

>   There are two classes, IPv4 and IPv6 whose __new__ never create an
> instance of its class, instead they create instances of other classes. Why
> IPv4 and IPv6 are classes and not (factory) functions (like function IP)?

hold over from when I was trying to be too fancy. fixed as well.

Cheers,
/peter

> Oleg.
> --
>     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
>           Programmers don't die, they just GOSUB without RETURN.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40hda3.com
>


More information about the Python-Dev mailing list