def pages_to_list(items):
 objs = []
 while True:
  try:
   page = items.next()
   for item in page:
    objs.append(item)
  except GeneratorExit:
   break
 return objs

def pages_to_list ( items ) : objs = [ ] while True : try : page = items . next ( ) for item in page : objs . append ( item ) except GeneratorExit : break return objs
convert a set of links from a group of pages to a list .