#NEWLINE# def __getitem__( self , n ) : #NEWLINE# #INDENT# network = int ( self . network_address ) #NEWLINE# broadcast = int ( self . broadcast_address ) #NEWLINE# if ( n >= 0 ) : #NEWLINE# #INDENT# if ( ( network + n ) > broadcast ) : #NEWLINE# #INDENT# raise IndexError #NEWLINE# #UNINDENT# return self . _address_class ( ( network + n ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# n += 1 #NEWLINE# if ( ( broadcast + n ) < network ) : #NEWLINE# #INDENT# raise IndexError #NEWLINE# #UNINDENT# return self . _address_class ( ( broadcast + self ) )