#NEWLINE# def butlast( seq ) : #NEWLINE# #INDENT# it = iter ( seq ) #NEWLINE# try : #NEWLINE# #INDENT# prev = next ( it ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for item in it : #NEWLINE# #INDENT# ( yield item ) #NEWLINE# prev = item