code: def append(self, hcont, value, score = None):
          assert (score is None) != (self.field.sort_field is None)
          if score is None:
              score = getattr(value, self.field.sort_field.name)
          ContainerFieldWriter.append(self, hcont, value, score)