#NEWLINE# def itercomplement( ta , tb , strict ) : #NEWLINE# #INDENT# ita = ( tuple ( row ) for row in iter ( ta ) ) #NEWLINE# itb = ( tuple ( row ) for row in iter ( tb ) ) #NEWLINE# ahdr = tuple ( next ( ita ) ) #NEWLINE# next ( itb ) #NEWLINE# ( yield ahdr ) #NEWLINE# try : #NEWLINE# #INDENT# a = next ( ita ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# b = next ( itb ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# ( yield a ) #NEWLINE# for row in ita : #NEWLINE# #INDENT# ( yield row ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# if ( ( b is None ) or ( Comparable ( a ) < Comparable ( b ) ) ) : #NEWLINE# #INDENT# ( yield a ) #NEWLINE# try : #NEWLINE# #INDENT# a = next ( ita ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( a == b ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# a = next ( ita ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if ( not strict ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# b = next ( itb ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# b = None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# b = next ( itb ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# b = None