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 generally available.

google.appengine.api.cmp_compat.cmp

Emulate Python 2 cmp in Python 3.

This is not necessarily a complete emulation; it's simply enough to support Titanoboa's port of apphosting.

a An object to compare
b Another object to compare

Negative if a is less than b, 0 if a equals b, and positive otherwise.