def to_python(self, value):
        if isinstance(value, basestring):
            try:
                value = datetime.date(*time.strptime(value, '%Y-%m-%d')[:3])
            except __HOLE__, e:
                raise ValueError('Invalid ISO date %r [%s]' % (value,
                    str(e)))
        return value
dataset/ETHPy150Open benoitc/couchdbkit/couchdbkit/schema/properties.py/DateProperty.to_python