Message279855
I would expect the following code to return ['10.9.8.8'] but it returns an empty list.
yosemite-osx$ python3
Python 3.5.1 (default, Dec 26 2015, 18:08:53)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> list(ipaddress.ip_network('10.9.8.7/32').hosts())
[]
This seems to happen for every /32 address. I'm guessing the logic which wants to exclude the gateway and broadcast addresses from a block should treat a /32 as a special case.
I tried to look for a previous bug submission but I could not find one. As such, it seems peculiar if this has not been reported before. Is this actually expected behavior by some rule I am overlooking?
I tested on Linux 3.4 and OSX Yosemite Homebrew / Python 3.5.1. |
|
Date |
User |
Action |
Args |
2016-11-01 07:02:04 | era | set | recipients:
+ era |
2016-11-01 07:02:04 | era | set | messageid: <1477983724.8.0.857875109595.issue28577@psf.upfronthosting.co.za> |
2016-11-01 07:02:04 | era | link | issue28577 messages |
2016-11-01 07:02:03 | era | create | |
|