def compare_zips(left, right):
    """
    yields EVENT,ENTRY pairs describing the differences between left
    and right ZipFile instances
    """

    ll = set(left.namelist())
    rl = set(right.namelist())

    for f in ll:
        if f in rl:
            rl.remove(f)

            if f[-1] == '/':
                # it's a directory entry
                pass

            elif _different(left, right, f):
                yield DIFF, f

            else:
                yield SAME, f

        else:
            yield LEFT, f

    for f in rl:
        yield RIGHT, f
def compare_zips ( left , right ) : ll = set ( left . namelist ( ) ) rl = set ( right . namelist ( ) ) for f in ll : if f in rl : rl . remove ( f ) if f [ - 1 ] == '/' : pass elif _different ( left , right , f ) : yield DIFF , f else : yield SAME , f else : yield LEFT , f for f in rl : yield RIGHT , f
yields EVENT,ENTRY pairs describing the differences between left
    and right ZipFile instances