ObjectUpdater.py 文件源码

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

项目:DownloaderForReddit 作者: MalloyDelacroix 项目源码 文件源码
def update_subreddit(cls, sub):
        """
        Creates a new Subreddit object with current methods and attributes and fills in the new subs attributes with
        the attributes from the old subreddit object.
        :param sub: The outdated subreddit object wich is to be updated.
        :type sub: Subreddit
        """
        new_sub = Subreddit(__version__, sub.name, sub.save_path, sub.post_limit, sub.avoid_duplicates,
                            sub.download_videos, sub.download_images, sub.subreddit_save_method, sub.name_downloads_by,
                            sub.user_added)
        cls.update_extras(sub, new_sub)
        return new_sub
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号