def samefile(a, b): a, b = canonicalize_path(a), canonicalize_path(b) if a == b: return True return _samefile(a, b)