Python 3.9 is now generally available.

google.appengine.api.cmp_compat.total_ordering_from_cmp

Class decorator that fills in missing ordering methods from __cmp__.

This lets us take a class defined for Python 2's ordering system (using __cmp__) and use it with minimal changes — just a decorator — in Python 3.

This implementation is adapted from the Python 2 version of functools.total_ordering, which derives these methods from each other instead of from __cmp__.

cls The class to decorate.

The decorated class.