On Sep 27, 2009, at 3:18 PM, Peter Moody wrote:

administrators) would use it, but it's doable. what you're claiming is
that my use case is invalid.

that's what I claim is broken.

He's claiming your solution to address your use case is confusing, not that the use case is invalid.

I'm not going to make ipaddr
less useful (strictly removing functionality), more bulky and
confusing (adding more confusingly named classes and methods) or
otherwise break the library in a vain attempt to have it included in
the stdlib.

If I understand correctly, the proposal for addressing the issue is to make two rather simple changes: 1) if strict=False, mask off the bits described by the netmask when creating an IPNetwork, such that the host bits are always 0.
2) add a single new function:

def parse_net_and_addr(s):
  return (IPNetwork(s), IPAddress(s.split('/')[0]))

James
_______________________________________________
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

Reply via email to