This is not documented anywhere, and instead I see countless hacks for making enum.StrEnum orderable. On the other hand, if we use the _sort_order_ then it is easier
class Example(enum.StrEnum):
FOO = enum.auto()
BAR = enum.auto()
def __gt__(self, other):
return self._sort_order_ > other._sort_order_
But would this be safe to use for the long term? Should it not be documented in that case? Is there something more complicated in the _sort_order_ that is being missed?