This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author era
Recipients era, xiang.zhang
Date 2016-11-01.08:16:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@xiang.zhang thanks for the quick reply.

I find this behavior surprising.  If I process a list of addresses, like

    ips = (

    for test in ['', '']:
      if test in [str(y) for x in ips for y in ipaddress.ip_network(x).hosts()]:
        print('{0} found'.format(test))
        print('{0} not found'.format(test))

I would expect both addresses to print "found", but that's not how the current implementation works.

I agree that the /28 should not include the gateway and broadcast addresses, but I would not expect the explicitly listed /32 address to completely disappear from the output.

Are my expectations incorrect?  For code like this, what should I use instead, if not hosts()?
Date User Action Args
2016-11-01 08:16:05erasetrecipients: + era, xiang.zhang
2016-11-01 08:16:05erasetmessageid: <>
2016-11-01 08:16:05eralinkissue28577 messages
2016-11-01 08:16:05eracreate