def getKey(self, key): values = listUtils.filterUniqueTrue([ obj.get(key) for obj in self.objects ]) if values: return values[0]
def joinFullnames(self, ancestors): ancestorsSelf = ancestors + [self] names = listUtils.filterUniqueTrue(map(lambda x: x.fullname, ancestorsSelf)) nameDelimeter = self.nameDelimeter return nameDelimeter.join ( names )