Skip to content

Commit 7ad52d1

Browse files
authored
This localization technique is no longer cost effective. (GH-30818)
1 parent 443dec6 commit 7ad52d1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Lib/functools.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,84 +86,84 @@ def wraps(wrapped,
8686
# infinite recursion that could occur when the operator dispatch logic
8787
# detects a NotImplemented result and then calls a reflected method.
8888

89-
def _gt_from_lt(self, other, NotImplemented=NotImplemented):
89+
def _gt_from_lt(self, other):
9090
'Return a > b. Computed by @total_ordering from (not a < b) and (a != b).'
9191
op_result = type(self).__lt__(self, other)
9292
if op_result is NotImplemented:
9393
return op_result
9494
return not op_result and self != other
9595

96-
def _le_from_lt(self, other, NotImplemented=NotImplemented):
96+
def _le_from_lt(self, other):
9797
'Return a <= b. Computed by @total_ordering from (a < b) or (a == b).'
9898
op_result = type(self).__lt__(self, other)
9999
if op_result is NotImplemented:
100100
return op_result
101101
return op_result or self == other
102102

103-
def _ge_from_lt(self, other, NotImplemented=NotImplemented):
103+
def _ge_from_lt(self, other):
104104
'Return a >= b. Computed by @total_ordering from (not a < b).'
105105
op_result = type(self).__lt__(self, other)
106106
if op_result is NotImplemented:
107107
return op_result
108108
return not op_result
109109

110-
def _ge_from_le(self, other, NotImplemented=NotImplemented):
110+
def _ge_from_le(self, other):
111111
'Return a >= b. Computed by @total_ordering from (not a <= b) or (a == b).'
112112
op_result = type(self).__le__(self, other)
113113
if op_result is NotImplemented:
114114
return op_result
115115
return not op_result or self == other
116116

117-
def _lt_from_le(self, other, NotImplemented=NotImplemented):
117+
def _lt_from_le(self, other):
118118
'Return a < b. Computed by @total_ordering from (a <= b) and (a != b).'
119119
op_result = type(self).__le__(self, other)
120120
if op_result is NotImplemented:
121121
return op_result
122122
return op_result and self != other
123123

124-
def _gt_from_le(self, other, NotImplemented=NotImplemented):
124+
def _gt_from_le(self, other):
125125
'Return a > b. Computed by @total_ordering from (not a <= b).'
126126
op_result = type(self).__le__(self, other)
127127
if op_result is NotImplemented:
128128
return op_result
129129
return not op_result
130130

131-
def _lt_from_gt(self, other, NotImplemented=NotImplemented):
131+
def _lt_from_gt(self, other):
132132
'Return a < b. Computed by @total_ordering from (not a > b) and (a != b).'
133133
op_result = type(self).__gt__(self, other)
134134
if op_result is NotImplemented:
135135
return op_result
136136
return not op_result and self != other
137137

138-
def _ge_from_gt(self, other, NotImplemented=NotImplemented):
138+
def _ge_from_gt(self, other):
139139
'Return a >= b. Computed by @total_ordering from (a > b) or (a == b).'
140140
op_result = type(self).__gt__(self, other)
141141
if op_result is NotImplemented:
142142
return op_result
143143
return op_result or self == other
144144

145-
def _le_from_gt(self, other, NotImplemented=NotImplemented):
145+
def _le_from_gt(self, other):
146146
'Return a <= b. Computed by @total_ordering from (not a > b).'
147147
op_result = type(self).__gt__(self, other)
148148
if op_result is NotImplemented:
149149
return op_result
150150
return not op_result
151151

152-
def _le_from_ge(self, other, NotImplemented=NotImplemented):
152+
def _le_from_ge(self, other):
153153
'Return a <= b. Computed by @total_ordering from (not a >= b) or (a == b).'
154154
op_result = type(self).__ge__(self, other)
155155
if op_result is NotImplemented:
156156
return op_result
157157
return not op_result or self == other
158158

159-
def _gt_from_ge(self, other, NotImplemented=NotImplemented):
159+
def _gt_from_ge(self, other):
160160
'Return a > b. Computed by @total_ordering from (a >= b) and (a != b).'
161161
op_result = type(self).__ge__(self, other)
162162
if op_result is NotImplemented:
163163
return op_result
164164
return op_result and self != other
165165

166-
def _lt_from_ge(self, other, NotImplemented=NotImplemented):
166+
def _lt_from_ge(self, other):
167167
'Return a < b. Computed by @total_ordering from (not a >= b).'
168168
op_result = type(self).__ge__(self, other)
169169
if op_result is NotImplemented:

0 commit comments

Comments
 (0)