pmoody <pyt...@hda3.com> added the comment: I'm biased ;) but I don't see what netaddr provides over ipaddr. it also seems to be in the neighborhood of 50% slower (at least on my mac mini).
pmo...@mini - 04:52 PM - ~/Downloads/ipaddr-1.0.1 -> python -m timeit 'import ipaddr;\ ipaddr.IP("1.1.1.1")' 10000 loops, best of 3: 46.2 usec per loop pmo...@mini - 04:52 PM - ~/Downloads/netaddr-0.5.2 -> python -m timeit 'import netaddr;\ netaddr.IP("1.1.1.1")' 10000 loops, best of 3: 71.9 usec per loop dealing with netmasks, the difference is even greater. pmo...@mini - 04:52 PM - ~/Downloads/ipaddr-1.0.1 -> python -m timeit 'import ipaddr;\ ipaddr.IP("1.1.1.1/255.255.255.0")' 10000 loops, best of 3: 78.4 usec per loop pmo...@mini - 04:49 PM - ~/Downloads/netaddr-0.5.2 -> python -m timeit 'import netaddr;\ > netaddr.IP("1.1.1.1/255.255.255.0")' 1000 loops, best of 3: 247 usec per loop (and it doesn't seem to deal with hostsmasked addresses). it also seems to be layed out in an unintuitive way, treating address ranges a something very different than network addresses. hopefully someone who isn't intimately familiar with both libraries can comment, but ipaddr feels a lot cleaner to me. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3959> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com