Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now available in preview.

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.