示例#1
0
    def __init__(self, data=dict()):
        self.title = data.get('title')

        dates = data.get('dates')
        self.dates = [d2date.parsePeriod(*p) for p in dates]

        self.data = data
示例#2
0
    def __init__(self, data=dict()):
        self.name = data.get('name')

        life = data.get('life')
        self.life = d2date.parsePeriod(*life)

        titles = data.get('titles', [])
        self.titles = [Title(t) for t in titles]

        self.data = data