Scott Dial <scott+python-dev <at> scottdial.com> writes: > > >>> gateway = net[1] > > I was then confused, because: > > >>> print(type(gateway)) > <class 'ipaddr.IPv4Address'> > > Which sorta blew my mind.. I fully expected to receive an IPNetwork back > from that operation.
Speaking as a non-network specialist, it actually looks logical to me to be given an address if I iterate over a network (the same way that, if I iterate on a list, I get individual elements, not 1-element sublists). I don't understand why you think the network mask should be part of an address. An address is just an address, it specifies the location of a host, not the configuration of the network surrounding it. If you look at an IP header, the destination address doesn't specify a netmask. _______________________________________________ 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