python functools total ordering