?? 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 + -