python get distinct values from list of objects