def partial_ordering(cls):
    def __lt__(self, other): return self <= other and not self >= other
    def __gt__(self, other): return self >= other and not self <= other
    def __eq__(self, other): return self >= other and self <= other

    if not hasattr(cls, '__lt__'): cls.__lt__ = __lt__
    if not hasattr(cls, '__gt__'): cls.__gt__ = __gt__
    if not hasattr(cls, '__eq__'): cls.__eq__ = __eq__

    return cls
Restore previous blending state.
dataset/ETHPy150Open mahmoud/boltons/boltons/funcutils.py/partial_ordering--crossover with--dataset/ETHPy150Open jorgecarleitao/pyglet-gui/pyglet_gui/manager.py/ViewerManagerGroup.unset_state