(a, b, common, shallow=True)
return res
Compare common files in two directories.

    a, b -- directory names
    common -- list of file names found in both directories
    shallow -- if true, do comparison based solely on stat() information

    Returns a tuple of three lists:
      files that compare equal
      files that are different
      filenames that aren't regular files.
Compare common files in two directories.
Compare common files in two directories .
def cmpfiles(a, b, common, shallow=True):
    """Compare common files in two directories.

    a, b -- directory names
    common -- list of file names found in both directories
    shallow -- if true, do comparison based solely on stat() information

    Returns a tuple of three lists:
      files that compare equal
      files that are different
      filenames that aren't regular files.

    """
    res = ([], [], [])
    for x in common:
        ax = os.path.join(a, x)
        bx = os.path.join(b, x)
        res[_cmp(ax, bx, shallow)].append(x)
    return res
def cmpfiles ( a , b , common , shallow = True ) : res = ( [ ] , [ ] , [ ] ) for x in common : ax = os . path . join ( a , x ) bx = os . path . join ( b , x ) res [ _cmp ( ax , bx , shallow ) ] . append ( x ) return res