📄 blog.py
字号:
__all__ = ['Blog', 'Post', 'Topic', 'TopicAssociation', 'Comment']import datetimefrom testlib.compat import *class Blog(object): def __init__(self, owner=None): self.owner = ownerclass Post(object): topics = set def __init__(self, user=None, headline=None, summary=None): self.user = user self.datetime = datetime.datetime.today() self.headline = headline self.summary = summary self.comments = [] self.comment_count = 0class Topic(object): def __init__(self, keyword=None, description=None): self.keyword = keyword self.description = descriptionclass TopicAssociation(object): def __init__(self, post=None, topic=None, is_primary=False): self.post = post self.topic = topic self.is_primary = is_primaryclass Comment(object): def __init__(self, subject=None, body=None): self.subject = subject self.datetime = datetime.datetime.today() self.body = body
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -