Clay McClure wrote: > On Tue, Jun 2, 2009 at 1:38 AM, "Martin v. Löwis" <mar...@v.loewis.de> wrote: > >> For the net-vs-host issue, I think a backwards-compatible solution >> is possible: just give the IP() function an option parameter that >> makes it reject a netmask during parsing. > > That doesn't solve much. IPv4 objects still always use CIDR notation > when coerced to strings, meaning that IP addresses will always be > rendered with a trailing "/32".
That's not true: py> x = ipaddr.IP("30.40.50.60") py> print(x.ip_ext_full) 30.40.50.60 > Such notation is unacceptable in > real-world applications that (correctly) distinguish between address > and network. So use a different notation that is also supported by the library. >> That was my feeling as well when ipaddr was first offered. It's just >> not an important library, and people will continue to roll their own >> for some time. OTOH, with ipaddr in the standard library, people will >> also start contributing extensions that make it support their use cases, >> so it should grow a wider application area than it currently supports. > > That being the case, why not delay its inclusion until we can be sure > that it in fact represents a good base upon which to build? Because we *are* sure that it in fact represents a good base upon which to build. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com