def next_char(input_iter):
 for ch in input_iter:
  if (ch != u'\\'):
   (yield (ch, False))
   continue
  ch = next(input_iter)
  representative = ESCAPE_MAPPINGS.get(ch, ch)
  if (representative is None):
   continue
  (yield (representative, True))

def next_char ( input_iter ) : for ch in input_iter : if ( ch != u'\\' ) : ( yield ( ch , False ) ) continue ch = next ( input_iter ) representative = ESCAPE_MAPPINGS . get ( ch , ch ) if ( representative is None ) : continue ( yield ( representative , True ) )
an iterator that yields the next character from "pattern_iter" .