def split_at(it, split_value):
 def _chunk_iterator(first):
  v = first
  while (v != split_value):
   (yield v)
   v = it.next()
 while True:
  (yield _chunk_iterator(it.next()))

def split_at ( it , split_value ) : def _chunk_iterator ( first ) : v = first while ( v != split_value ) : ( yield v ) v = it . next ( ) while True : ( yield _chunk_iterator ( it . next ( ) ) )
splits an iterator c{it} at values of c{split_value} .