def _fallback_next(it, default=_unspecified_next_default):
 if (default is _unspecified_next_default):
  return it.next()
 else:
  try:
   return it.next()
  except StopIteration:
   return default

def _fallback_next ( it , default = _unspecified_next_default ) : if ( default is _unspecified_next_default ) : return it . next ( ) else : try : return it . next ( ) except StopIteration : return default
retrieve the next item from the iterator by calling its next() method .