Python/Sorting
From charlesreid1
Python sorting: https://wiki.python.org/moin/HowTo/Sorting
Python sorted containers: http://www.grantjenks.com/docs/sortedcontainers/
Python bintrees implementation of dictionaries and lists: https://pypi.python.org/pypi/bintrees
>>> Student.__eq__ = lambda self, other: self.age == other.age
>>> Student.__ne__ = lambda self, other: self.age != other.age
>>> Student.__lt__ = lambda self, other: self.age < other.age
>>> Student.__le__ = lambda self, other: self.age <= other.age
>>> Student.__gt__ = lambda self, other: self.age > other.age
>>> Student.__ge__ = lambda self, other: self.age >= other.age
>>> sorted(student_objects)
[('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)]