@@ -98,7 +98,7 @@ def _gt_from_lt(self, other):
98
98
'Return a > b. Computed by @total_ordering from (not a < b) and (a != b).'
99
99
op_result = self .__lt__ (other )
100
100
if op_result is NotImplemented :
101
- return NotImplemented
101
+ return op_result
102
102
return not op_result and self != other
103
103
104
104
def _le_from_lt (self , other ):
@@ -110,35 +110,35 @@ def _ge_from_lt(self, other):
110
110
'Return a >= b. Computed by @total_ordering from (not a < b).'
111
111
op_result = self .__lt__ (other )
112
112
if op_result is NotImplemented :
113
- return NotImplemented
113
+ return op_result
114
114
return not op_result
115
115
116
116
def _ge_from_le (self , other ):
117
117
'Return a >= b. Computed by @total_ordering from (not a <= b) or (a == b).'
118
118
op_result = self .__le__ (other )
119
119
if op_result is NotImplemented :
120
- return NotImplemented
120
+ return op_result
121
121
return not op_result or self == other
122
122
123
123
def _lt_from_le (self , other ):
124
124
'Return a < b. Computed by @total_ordering from (a <= b) and (a != b).'
125
125
op_result = self .__le__ (other )
126
126
if op_result is NotImplemented :
127
- return NotImplemented
127
+ return op_result
128
128
return op_result and self != other
129
129
130
130
def _gt_from_le (self , other ):
131
131
'Return a > b. Computed by @total_ordering from (not a <= b).'
132
132
op_result = self .__le__ (other )
133
133
if op_result is NotImplemented :
134
- return NotImplemented
134
+ return op_result
135
135
return not op_result
136
136
137
137
def _lt_from_gt (self , other ):
138
138
'Return a < b. Computed by @total_ordering from (not a > b) and (a != b).'
139
139
op_result = self .__gt__ (other )
140
140
if op_result is NotImplemented :
141
- return NotImplemented
141
+ return op_result
142
142
return not op_result and self != other
143
143
144
144
def _ge_from_gt (self , other ):
@@ -150,28 +150,28 @@ def _le_from_gt(self, other):
150
150
'Return a <= b. Computed by @total_ordering from (not a > b).'
151
151
op_result = self .__gt__ (other )
152
152
if op_result is NotImplemented :
153
- return NotImplemented
153
+ return op_result
154
154
return not op_result
155
155
156
156
def _le_from_ge (self , other ):
157
157
'Return a <= b. Computed by @total_ordering from (not a >= b) or (a == b).'
158
158
op_result = self .__ge__ (other )
159
159
if op_result is NotImplemented :
160
- return NotImplemented
160
+ return op_result
161
161
return not op_result or self == other
162
162
163
163
def _gt_from_ge (self , other ):
164
164
'Return a > b. Computed by @total_ordering from (a >= b) and (a != b).'
165
165
op_result = self .__ge__ (other )
166
166
if op_result is NotImplemented :
167
- return NotImplemented
167
+ return op_result
168
168
return op_result and self != other
169
169
170
170
def _lt_from_ge (self , other ):
171
171
'Return a < b. Computed by @total_ordering from (not a >= b).'
172
172
op_result = self .__ge__ (other )
173
173
if op_result is NotImplemented :
174
- return NotImplemented
174
+ return op_result
175
175
return not op_result
176
176
177
177
def total_ordering (cls ):
0 commit comments