@total_ordering
class Student:

    def __eq__(self, other):
        return (self.lastname.lower(), self.firstname.lower()) == (other.
            lastname.lower(), other.firstname.lower())

def __lt__(self, other):
    return (self.lastname.lower(), self.firstname.lower()) < (other.
        lastname.lower(), other.firstname.lower())
Is it safe to just implement __lt__ for a class that will be sorted?