diff -r 9354df85afd7 Lib/ipaddress.py --- a/Lib/ipaddress.py Thu Oct 03 15:16:03 2013 -0600 +++ b/Lib/ipaddress.py Thu Oct 03 23:45:49 2013 +0100 @@ -2092,3 +2092,15 @@ """ return (self.network_address.is_site_local and self.broadcast_address.is_site_local) + + def hosts(self): + """Generate Iterator over usable hosts in a network. + + This is like __iter__ except it doesn't return the + Subnet-Router anycast address. + + """ + network = int(self.network_address) + broadcast = int(self.broadcast_address) + for x in range(network + 1, broadcast + 1): + yield self._address_class(x)