@@ -88,84 +88,84 @@ def wraps(wrapped,
88
88
89
89
def _gt_from_lt (self , other , NotImplemented = NotImplemented ):
90
90
'Return a > b. Computed by @total_ordering from (not a < b) and (a != b).'
91
- op_result = self .__lt__ (other )
91
+ op_result = type ( self ) .__lt__ (self , other )
92
92
if op_result is NotImplemented :
93
93
return op_result
94
94
return not op_result and self != other
95
95
96
96
def _le_from_lt (self , other , NotImplemented = NotImplemented ):
97
97
'Return a <= b. Computed by @total_ordering from (a < b) or (a == b).'
98
- op_result = self .__lt__ (other )
98
+ op_result = type ( self ) .__lt__ (self , other )
99
99
if op_result is NotImplemented :
100
100
return op_result
101
101
return op_result or self == other
102
102
103
103
def _ge_from_lt (self , other , NotImplemented = NotImplemented ):
104
104
'Return a >= b. Computed by @total_ordering from (not a < b).'
105
- op_result = self .__lt__ (other )
105
+ op_result = type ( self ) .__lt__ (self , other )
106
106
if op_result is NotImplemented :
107
107
return op_result
108
108
return not op_result
109
109
110
110
def _ge_from_le (self , other , NotImplemented = NotImplemented ):
111
111
'Return a >= b. Computed by @total_ordering from (not a <= b) or (a == b).'
112
- op_result = self .__le__ (other )
112
+ op_result = type ( self ) .__le__ (self , other )
113
113
if op_result is NotImplemented :
114
114
return op_result
115
115
return not op_result or self == other
116
116
117
117
def _lt_from_le (self , other , NotImplemented = NotImplemented ):
118
118
'Return a < b. Computed by @total_ordering from (a <= b) and (a != b).'
119
- op_result = self .__le__ (other )
119
+ op_result = type ( self ) .__le__ (self , other )
120
120
if op_result is NotImplemented :
121
121
return op_result
122
122
return op_result and self != other
123
123
124
124
def _gt_from_le (self , other , NotImplemented = NotImplemented ):
125
125
'Return a > b. Computed by @total_ordering from (not a <= b).'
126
- op_result = self .__le__ (other )
126
+ op_result = type ( self ) .__le__ (self , other )
127
127
if op_result is NotImplemented :
128
128
return op_result
129
129
return not op_result
130
130
131
131
def _lt_from_gt (self , other , NotImplemented = NotImplemented ):
132
132
'Return a < b. Computed by @total_ordering from (not a > b) and (a != b).'
133
- op_result = self .__gt__ (other )
133
+ op_result = type ( self ) .__gt__ (self , other )
134
134
if op_result is NotImplemented :
135
135
return op_result
136
136
return not op_result and self != other
137
137
138
138
def _ge_from_gt (self , other , NotImplemented = NotImplemented ):
139
139
'Return a >= b. Computed by @total_ordering from (a > b) or (a == b).'
140
- op_result = self .__gt__ (other )
140
+ op_result = type ( self ) .__gt__ (self , other )
141
141
if op_result is NotImplemented :
142
142
return op_result
143
143
return op_result or self == other
144
144
145
145
def _le_from_gt (self , other , NotImplemented = NotImplemented ):
146
146
'Return a <= b. Computed by @total_ordering from (not a > b).'
147
- op_result = self .__gt__ (other )
147
+ op_result = type ( self ) .__gt__ (self , other )
148
148
if op_result is NotImplemented :
149
149
return op_result
150
150
return not op_result
151
151
152
152
def _le_from_ge (self , other , NotImplemented = NotImplemented ):
153
153
'Return a <= b. Computed by @total_ordering from (not a >= b) or (a == b).'
154
- op_result = self .__ge__ (other )
154
+ op_result = type ( self ) .__ge__ (self , other )
155
155
if op_result is NotImplemented :
156
156
return op_result
157
157
return not op_result or self == other
158
158
159
159
def _gt_from_ge (self , other , NotImplemented = NotImplemented ):
160
160
'Return a > b. Computed by @total_ordering from (a >= b) and (a != b).'
161
- op_result = self .__ge__ (other )
161
+ op_result = type ( self ) .__ge__ (self , other )
162
162
if op_result is NotImplemented :
163
163
return op_result
164
164
return op_result and self != other
165
165
166
166
def _lt_from_ge (self , other , NotImplemented = NotImplemented ):
167
167
'Return a < b. Computed by @total_ordering from (not a >= b).'
168
- op_result = self .__ge__ (other )
168
+ op_result = type ( self ) .__ge__ (self , other )
169
169
if op_result is NotImplemented :
170
170
return op_result
171
171
return not op_result
0 commit comments