def __eq__(self, file):
        """Return True if the absolute path is same"""
        if isinstance(file, File):
            return self.path == file.path
        else:
            return self.path == os.path.abspath(file)
        return False
def __eq__ ( self , file ) : if isinstance ( file , File ) : return self . path == file . path else : return self . path == os . path . abspath ( file ) return False
Return True if the absolute path is same