code: def to_dict(self, instance, d):
          
  
          value = self.__get__(instance, type(instance))
          if value == self.default:
              return
  
          d[self.tag] = self.type_.format(value)
docs: Override the implementation from :class:`Text` by storing the formatted
          value in the XML attribute instead of the character data.
  
          If the value is :data:`None`, no element is generated.