#NEWLINE# def __eq__( self , other ) : #NEWLINE# #INDENT# if isinstance ( other , tuple ) : #NEWLINE# #INDENT# warnings . warn ( 'IPv4Address.__getitem__ is deprecated.  Use attributes instead.' , category = DeprecationWarning , stacklevel = 2 ) #NEWLINE# return ( ( self . host , self . port ) == other ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( other , IPv4Address ) : #NEWLINE# #INDENT# a = ( self . type , self . host , self . port ) #NEWLINE# b = ( other . type , a . host , other . port ) #NEWLINE# return ( a == b ) #NEWLINE# #UNINDENT# #UNINDENT# return False