#NEWLINE# def __sub__( self , other ) : #NEWLINE# #INDENT# ( out , i , j , u , v ) = ( [ ] , 0 , 0 , self . value , other . value ) #NEWLINE# try : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# if ( u [ i ] [ 0 ] < v [ j ] [ 0 ] ) : #NEWLINE# #INDENT# i += 1 #NEWLINE# out . append ( ( i , u [ i ] [ 1 ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( u [ i ] [ 0 ] > v [ j ] [ 0 ] ) : #NEWLINE# #INDENT# j += 1 #NEWLINE# out . append ( ( i , ( - v [ j ] [ 1 ] ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( i , j ) = ( ( i + 1 ) , ( j + 1 ) ) #NEWLINE# out . append ( ( i , ( u [ i ] [ 1 ] - v [ j ] [ 1 ] ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# except IndexError : #NEWLINE# #INDENT# return Vector ( tuple ( out ) )