m=container.objectValues('File') t=[] for x in m: if getattr(x, tunnus).startswith(sisu): t.append(x) return t