def set(self, value):
        try:
            # adapt and normalize the value, if possible
            value = self.value = self.adapt(value)
        except AdaptationError:
            self.value = None
            if value is None:
                self.u = u''
            elif isinstance(value, unicode):
                self.u = value
            else:
                try:
                    self.u = unicode(value)
                except UnicodeDecodeError:
                    self.u = unicode(value, errors='replace')
            return False

        # stringify it, possibly storing what we received verbatim or a
        # normalized version of it.
        if value is None:
            self.u = u''
        else:
            self.u = self.serialize(value)
        return True
Assign the native and Unicode value.
dataset/ETHPy150Open jek/flatland/flatland/schema/scalars.py/Scalar.set