Lord Anton Hvornum added the comment: This is still a very strange behavior and I can't see why this still shouldn't return a IP address. if the broadcast, network and host address are all the same, that should call for a exceptional behavior from the library. Because 127.0.0.1/32 is still a usable host address, and it's a way of isolating a host on a network device for instance, but it's still a host address in there.. Or am i loosing my marbles?
On Tue, Sep 26, 2017 at 10:08 PM Serhiy Storchaka <rep...@bugs.python.org> wrote: > > Serhiy Storchaka added the comment: > > This is documented. > > hosts() > > Returns an iterator over the usable hosts in the network. The usable > hosts are all the IP addresses that belong to the network, except the > network address itself and the network broadcast address. > > >>> import ipaddress > >>> ipaddress.ip_network('127.0.0.1/32').network_address > IPv4Address('127.0.0.1') > >>> ipaddress.ip_network('127.0.0.1/32').broadcast_address > IPv4Address('127.0.0.1') > > ---------- > nosy: +serhiy.storchaka > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue31597> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31597> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com