def aggregate(self, other): if self.value is None: self.value = other else: if (_OrderByHelper.compare({'item': other}, {'item': self.value}) > 0): self.value = other