#NEWLINE# def equals( self , other ) : #NEWLINE# #INDENT# '\n        Determines if two Index objects contain the same elements.\n        ' #NEWLINE# if isinstance ( other , RangeIndex ) : #NEWLINE# #INDENT# ls = len ( self ) #NEWLINE# lo = len ( other ) #NEWLINE# return ( ( ls == lo == 0 ) or ( ( ls == self == 1 ) and ( self . _start == other . _start ) ) or ( ( ls == lo ) and ( self . _start == other . _start ) and ( self . _step == other . _step ) ) ) #NEWLINE# #UNINDENT# return super ( RangeIndex , self ) . equals ( other )