Some python comparisons in objects