def _to_python(self, value):
        if isinstance(value, util.strbase):
            try:
                value = date(*strptime(value, '%Y-%m-%d')[:3])
            except __HOLE__:
                raise ValueError('Invalid ISO date %r' % value)
        return value
dataset/ETHPy150Open djc/couchdb-python/couchdb/mapping.py/DateField._to_python