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 Lord Anton Hvornum
Recipients Lord Anton Hvornum
Date 2017-09-26.19:00:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

I couldn't find anywhere in the documentation mentioning the fact that doing the following would return nothing:

>>> import ipaddress
>>> net = ipaddress.ip_network('')
>>> list(net.hosts())

For all intense and purposes, that network still contains hosts.
That being one single lonely host of ''.

It's illogical to not return any hosts if there actually are one or more in there.
Now the programmer has to do a one-off-check to see if this particular defined network (of a huge list usually)
happens to end with /32, then it needs to treat the item not as a defined network (even tho it is with a netmask),
but rather strip the netmask and treat it as a single host entity.. It makes no sense if you're iterating over a huge list of network infrastructure.
Date User Action Args
2017-09-26 19:00:01Lord Anton Hvornumsetrecipients: + Lord Anton Hvornum
2017-09-26 19:00:01Lord Anton Hvornumsetmessageid: <>
2017-09-26 19:00:01Lord Anton Hvornumlinkissue31597 messages
2017-09-26 19:00:01Lord Anton Hvornumcreate