#NEWLINE# def __contains__( self , other ) : #NEWLINE# #INDENT# if isinstance ( other , ( int , float ) ) : #NEWLINE# #INDENT# return ( ( self . start <= other ) and ( self . end >= other ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( self . start <= other . start ) and ( self . end <= self . end ) )