def __init__(self, value):
        """Constructor.

        @param value: The date value of the object.
        @type value: (datetime.date|str)
        @raise ValueError: When I{value} is invalid.

        """
        if isinstance(value, datetime.date):
            self.value = value
        elif isinstance(value, str):
            self.value = self.parse(value)
        else:
            raise ValueError('invalid type for Date(): %s' % (type(value), ))
def __init__ ( self , value ) : if isinstance ( value , datetime . date ) : self . value = value elif isinstance ( value , str ) : self . value = self . parse ( value ) else : raise ValueError ( 'invalid type for Date(): %s' % ( type ( value ) , ) )
Constructor.

        @param value: The date value of the object.
        @type value: (datetime.date|str)
        @raise ValueError: When I{value} is invalid.