18 Aug
2009
18 Aug
'09
1:34 p.m.
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'. 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)? Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.