Home
last modified time | relevance | path

Searched refs:mycmp (Results 1 – 12 of 12) sorted by relevance

/external/scapy/scapy/
Dcompat.py21 def cmp_to_key(mycmp): argument
34 return mycmp(self.obj, other.obj) < 0
36 return mycmp(self.obj, other.obj) > 0
38 return mycmp(self.obj, other.obj) == 0
40 return mycmp(self.obj, other.obj) <= 0
42 return mycmp(self.obj, other.obj) >= 0
44 return mycmp(self.obj, other.obj) != 0
/external/python/cpython2/Lib/
Dfunctools.py85 def cmp_to_key(mycmp): argument
92 return mycmp(self.obj, other.obj) < 0
94 return mycmp(self.obj, other.obj) > 0
96 return mycmp(self.obj, other.obj) == 0
98 return mycmp(self.obj, other.obj) <= 0
100 return mycmp(self.obj, other.obj) >= 0
102 return mycmp(self.obj, other.obj) != 0
/external/selinux/python/sepolgen/src/sepolgen/
Dutil.py148 def cmp_to_key(mycmp): argument
154 return mycmp(self.obj, other.obj) < 0
156 return mycmp(self.obj, other.obj) > 0
158 return mycmp(self.obj, other.obj) == 0
160 return mycmp(self.obj, other.obj) <= 0
162 return mycmp(self.obj, other.obj) >= 0
164 return mycmp(self.obj, other.obj) != 0
/external/XNNPACK/scripts/
Dsort-filenames.py65 def cmp_to_key(mycmp): argument
71 return mycmp(self.obj, other.obj) < 0
73 return mycmp(self.obj, other.obj) > 0
75 return mycmp(self.obj, other.obj) == 0
77 return mycmp(self.obj, other.obj) <= 0
79 return mycmp(self.obj, other.obj) >= 0
81 return mycmp(self.obj, other.obj) != 0
/external/python/cpython3/Doc/howto/
Dsorting.rst269 def cmp_to_key(mycmp):
275 return mycmp(self.obj, other.obj) < 0
277 return mycmp(self.obj, other.obj) > 0
279 return mycmp(self.obj, other.obj) == 0
281 return mycmp(self.obj, other.obj) <= 0
283 return mycmp(self.obj, other.obj) >= 0
285 return mycmp(self.obj, other.obj) != 0
/external/python/cpython2/Doc/howto/
Dsorting.rst239 def cmp_to_key(mycmp):
245 return mycmp(self.obj, other.obj) < 0
247 return mycmp(self.obj, other.obj) > 0
249 return mycmp(self.obj, other.obj) == 0
251 return mycmp(self.obj, other.obj) <= 0
253 return mycmp(self.obj, other.obj) >= 0
255 return mycmp(self.obj, other.obj) != 0
/external/python/cpython3/Lib/
Dfunctools.py206 def cmp_to_key(mycmp): argument
213 return mycmp(self.obj, other.obj) < 0
215 return mycmp(self.obj, other.obj) > 0
217 return mycmp(self.obj, other.obj) == 0
219 return mycmp(self.obj, other.obj) <= 0
221 return mycmp(self.obj, other.obj) >= 0
/external/libxml2/python/
Dgenerator.py902 def cmp_to_key(mycmp): argument
908 return mycmp(self.obj, other.obj) < 0
910 return mycmp(self.obj, other.obj) > 0
912 return mycmp(self.obj, other.obj) == 0
914 return mycmp(self.obj, other.obj) <= 0
916 return mycmp(self.obj, other.obj) >= 0
918 return mycmp(self.obj, other.obj) != 0
/external/python/cpython2/Lib/test/
Dtest_functools.py491 def mycmp(x, y): function
493 self.assertEqual(sorted(range(5), key=functools.cmp_to_key(mycmp)),
497 def mycmp(x, y): function
499 key = functools.cmp_to_key(mycmp)
/external/python/cpython3/Lib/test/
Dtest_functools.py885 key = self.cmp_to_key(mycmp=cmp1)
920 key = self.cmp_to_key(mycmp=cmp1)
924 def mycmp(x, y): function
926 self.assertEqual(sorted(range(5), key=self.cmp_to_key(mycmp)),
930 def mycmp(x, y): function
934 values = sorted(values, key=self.cmp_to_key(mycmp))
939 def mycmp(x, y): function
941 key = self.cmp_to_key(mycmp)
/external/python/cpython2/Objects/
Dlistsort.txt614 def mycmp(x, y):
625 bound(mycmp)
/external/python/cpython3/Objects/
Dlistsort.txt614 def mycmp(x, y):
625 bound(mycmp)