def unserialize(self, data): """ Converts a serialized tuple of data to an object """ if data == None: self.date = Date() else: self.date = Date().unserialize(data)
def __init__(self, source=None): """ Create a new DateBase, copying from source if not None @param source: Object used to initialize the new object @type source: DateBase """ if source: self.date = Date(source.date) else: self.date = Date()
def get_date_object(self): """ Returns the L{Date} object associated with the DateBase. @return: Returns a DateBase L{Date} instance. @rtype: L{Date} """ if not self.date: self.date = Date() return self.date