R. David Murray <rdmurray <at> bitdance.com> writes: > > x = IPv4AddressWithMask('192.168.1.1/24') > x.network == IPv4Network('192.168.1.0/24') > x.network[1] == x
I don't think we need an IPAddressWithMask which would just complicate the API without any obvious benefit. We just need a factory function which returns a tuple after parsing: >>> addr, net = parse_address_with_mask('192.168.1.1/24') >>> addr == IPv4Address('192.168.1.1') True >>> net == IPv4Network('192.168.1.0/24') True Regards Antoine. _______________________________________________ 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