def append(self, hcont, value, score = None):
assert (score is None) != (self.field.sort_field is None)<EOL>if score is None:<EOL><INDENT>score = getattr(value, self.field.sort_field.name)<EOL><DEDENT>ContainerFieldWriter.append(self, hcont, value, score)<EOL>
If sort_field is specified, score must be None.
            If sort_field is not specified, score is mandatory.