'Return whether other_path is the same or not as this file
(as returned by os.path.samefile()).'

def samefile(self, other_path):

    st = self.stat()
    try:
        other_st = other_path.stat()
    except AttributeError:
        other_st = os.stat(other_path)
    return os.path.samestat(st, other_st)
