#NEWLINE# def iter_hosts( self ) : #NEWLINE# #INDENT# "\n        An generator that provides all the IP addresses that can be assigned\n        to hosts within the range of this IP object's subnet.\n\n        - for IPv4, the network and broadcast addresses are always excluded.           Any subnet that contains less than 4 IP addresses yields an empty list.\n\n        - for IPv6, only the unspecified address '::' or Subnet-Router anycast           address (first address in the network) is excluded.\n\n        :return: an IPAddress iterator\n        " #NEWLINE# it_hosts = iter ( [ ] ) #NEWLINE# if ( self . _module . version == 4 ) : #NEWLINE# #INDENT# if ( self . size >= 4 ) : #NEWLINE# #INDENT# it_hosts = iter_iprange ( IPAddress ( ( self . first + 1 ) , self . _module . version ) , IPAddress ( ( self . last - 1 ) , self . _module . version ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# it_hosts = iter_iprange ( IPAddress ( self . first , self . _module . version ) , IPAddress ( self . last , self . _module . version ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . size >= 2 ) : #NEWLINE# #INDENT# it_hosts = iter_iprange ( IPAddress ( ( self . first + 1 ) , self . _module . version ) , IPAddress ( self . last , self . _module . version ) ) #NEWLINE# #UNINDENT# #UNINDENT# return it_hosts