xpgdiff.py
def next_or_none(seq):
    """
    Gets an iterator-like function for sequence.  Instead of raising a
    StopIteration exception, the function returns None when the sequence
    is exhausted.

    :param seq: The sequence to iterate over.
    :returns: The iterator-like function.
    """
    def _next():
        try:
            return next(_iter)
        except StopIteration:
            return None

    _iter = iter(seq)
    return _next

    Gets an iterator-like function for sequence.  Instead of raising a
    StopIteration exception, the function returns None when the sequence
    is exhausted.

    :param seq: The sequence to iterate over.
    :returns: The iterator-like function.
    
Gets an iterator-like function for sequence.  Instead of raising a
StopIteration exception, the function returns None when the sequence
is exhausted.
Gets an iterator - like function for sequence . Instead of raising a StopIteration exception the function returns None when the sequence is exhausted .
def next_or_none(seq):
    def _next():
        try:
            return next(_iter)
        except StopIteration:
            return None
    _iter = iter(seq)
    return _next
def next_or_none ( seq ) : def _next ( ) : try : return next ( _iter ) except StopIteration : return None _iter = iter ( seq ) return _next
Gets an iterator-like function for sequence.
Gets an iterator - like function for sequence .
"""
    Gets an iterator-like function for sequence.  Instead of raising a
    StopIteration exception, the function returns None when the sequence
    is exhausted.

    :param seq: The sequence to iterate over.
    :returns: The iterator-like function.
    """
The iterator-like function.
The iterator - like function .
seq
The sequence to iterate over.
The sequence to iterate over .