#NEWLINE# def next( itr , default = _undef ) : #NEWLINE# #INDENT# 'compat wrapper for next()' #NEWLINE# if ( itr is _undef ) : #NEWLINE# #INDENT# return itr . next ( ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# return itr . next ( ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# return default