moviedata_ans.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:LearningPyQt 作者: manashmndl 项目源码 文件源码
def add(self, movie):
        """Adds the given movie to the list if it isn't already
        present. Returns True if added; otherwise returns False."""
        if id(movie) in self.__movieFromId:
            return False
        key = self.key(movie.title, movie.year)
        bisect.insort_left(self.__movies, [key, movie])
        self.__movieFromId[id(movie)] = movie
        self.__dirty = True
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号