I noticed that the first and last IPv6 addresses of a given network are omitted:
$ python3
Python 3.3.2 (default, Sep 6 2013, 09:30:10)
[GCC 4.8.1 20130725 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> print("\n".join([str(x) for x in ipaddress.ip_network("2001:0db8::/120").hosts()]))
2001:db8::1
2001:db8::2
...
2001:db8::fe
>>>
>>> hex(int(ipaddress.ip_address('2001:db8::fe')))
'0x20010db80000000000000000000000fe'
I believe that for IPv4 this is correct, as those represent the network and broadcast addresses, but I don't believe those exist in IPv6 - at least section-2.5.4 of RFC4291 doesn't seem to mention it. I checked the errata and I don't think the updating RFCs are relevant. The section on interface identifiers also doesn't appear to reserve the first/last addresses.
Does anyone know why these addresses are omitted? Is this a bug in the standard library?
EDIT:
Ok, looks like the first address is a Subnet-Router anycast address, so that explains why the first address is omitted.
The last address could be a reserved anycast address, though so is for example 2001:db8::fe/120
(which you can find in the output above), so this is certainly handled inconsistently. Does anybody know why?