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
ObjectUpdater.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录