def iter_words(string):
 i = 0
 last_sep_index = (-1)
 inside_word = False
 for char in string:
  if ((ord(char) < 128) and (char in seps)):
   if inside_word:
    (yield _Word(span=((last_sep_index + 1), i), value=string[(last_sep_index + 1):i]))
   inside_word = False
   last_sep_index = i
  else:
   inside_word = True
  i += 1
 if inside_word:
  (yield _Word(span=((last_sep_index + 1), i), value=string[(last_sep_index + 1):i]))

def iter_words ( string ) : i = 0 last_sep_index = ( - 1 ) inside_word = False for char in string : if ( ( ord ( char ) < 128 ) and ( char in seps ) ) : if inside_word : ( yield _Word ( span = ( ( last_sep_index + 1 ) , i ) , value = string [ ( last_sep_index + 1 ) : i ] ) ) inside_word = False last_sep_index = i else : inside_word = True i += 1 if inside_word : ( yield _Word ( span = ( ( last_sep_index + 1 ) , i ) , value = string [ ( last_sep_index + 1 ) : i ] ) )
iterate on all words in a string .